CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 33 matches
CCS Forum Index
Author Message
  Topic: digipot problem
mshearer

Replies: 6
Views: 7216

PostForum: General CCS C Discussion   Posted: Mon Jun 08, 2009 10:25 am   Subject: digipot problem
ah very sorry AD8400
  Topic: digipot problem
mshearer

Replies: 6
Views: 7216

PostForum: General CCS C Discussion   Posted: Mon Jun 08, 2009 3:26 am   Subject: digipot problem
Hi

I'm using an 18f4520 and trying to control a digitpot. In general this works perfectly for me.
I can configure the digipot at the start of my project to adjust a adc input to exactly 2.5V.

...
  Topic: external ADC AD7476
mshearer

Replies: 12
Views: 16569

PostForum: General CCS C Discussion   Posted: Tue Mar 24, 2009 9:56 am   Subject: external ADC AD7476
great Smile results seem a bit more solid now, as in I'm always getting the same thing.
I think this is probably going to be more down to how I'm providing/measuring my inputs but I seem to get increase ...
  Topic: external ADC AD7476
mshearer

Replies: 12
Views: 16569

PostForum: General CCS C Discussion   Posted: Sat Mar 21, 2009 10:22 am   Subject: external ADC AD7476
actually, one more quick thing. Any idea why my first result is always something way off. Think it used to be always 0xFFF but not sure what it is now.

matt
  Topic: external ADC AD7476
mshearer

Replies: 12
Views: 16569

PostForum: General CCS C Discussion   Posted: Fri Mar 20, 2009 2:34 am   Subject: external ADC AD7476
1)

SSPSTAT = 0x00; /* SPI status Register */
SSPCON1 = 0x21; /* SPI control Register 1 */


2) 10Mhz Crystal through HSPLL to 40Mhz

3) Should be 5V, comes in just above so using 5 ...
  Topic: external ADC AD7476
mshearer

Replies: 12
Views: 16569

PostForum: General CCS C Discussion   Posted: Thu Mar 19, 2009 7:28 am   Subject: external ADC AD7476
Hi, Im having a bit of trouble with my ADC. I do get results, and they are very close to what they should be. however they shift about an awful lot with each reading.

i.e. with a 4volt input i s ...
  Topic: replacing putc with write to TXREG
mshearer

Replies: 6
Views: 8624

PostForum: General CCS C Discussion   Posted: Thu Mar 05, 2009 7:58 am   Subject: replacing putc with write to TXREG
changing the position of the parity generation seems to have done it.


void send_byte(char c)
{

while(!bit_TXIF)
continue;
parity_errorGeneration& ...
  Topic: replacing putc with write to TXREG
mshearer

Replies: 6
Views: 8624

PostForum: General CCS C Discussion   Posted: Thu Mar 05, 2009 7:21 am   Subject: replacing putc with write to TXREG
I have concerns that using compiler functions might be called up by a safety board at a later date. Any experience of this with the likes of putc() ?

The USART takes care of parity if you use

...
  Topic: replacing putc with write to TXREG
mshearer

Replies: 6
Views: 8624

PostForum: General CCS C Discussion   Posted: Thu Mar 05, 2009 6:00 am   Subject: replacing putc with write to TXREG
example source
Im working on a PICDEM baord with a 10MHZ crystal. Aiming to work at 9600baud, odd parity


#include <18F4520.h>
#fuses H4
#fuses NOWDT
#fuses WDT128
#fuses NO ...
  Topic: replacing putc with write to TXREG
mshearer

Replies: 6
Views: 8624

PostForum: General CCS C Discussion   Posted: Thu Mar 05, 2009 5:08 am   Subject: replacing putc with write to TXREG
I'm having a bit of a problem with using the TXREG.

I'm trying to output a chain of hex values
00 A1 F2 C4 40 00 00 00 00 00 F0 00 01 01 00 00

when i use putc(); i get the correct 16bytes out. ...
  Topic: HS PLL
mshearer

Replies: 3
Views: 4280

PostForum: General CCS C Discussion   Posted: Thu Feb 19, 2009 3:43 am   Subject: HS PLL
Chip is the 18F4520.
My serial comms all work fine, which i guess is a good indicator that the clock/baud are working correctly

thanks for your help
matt
  Topic: HS PLL
mshearer

Replies: 3
Views: 4280

PostForum: General CCS C Discussion   Posted: Wed Feb 18, 2009 9:24 am   Subject: HS PLL
Hi, can i just re-assure myself by asking

is
#fuses H4 // HS/PLL

#use delay(clock=40000000)


all that is needed to set up a 40Mhz clock off a 10MHz crystal using pllX4?


...
  Topic: rs232 errors
mshearer

Replies: 5
Views: 5593

PostForum: General CCS C Discussion   Posted: Fri Feb 06, 2009 4:55 am   Subject: rs232 errors
well figured out the lag.
Stupidly enough i was reading the RX9D bit after reading from the RCREG, therefore clearing the register and reading the wrong RX9D.

might stick with this, and not use ge ...
  Topic: rs232 errors
mshearer

Replies: 5
Views: 5593

PostForum: General CCS C Discussion   Posted: Fri Feb 06, 2009 4:27 am   Subject: rs232 errors
Hi, thanks both for the replys

I believe the clockspeed is correct, it does measure 20 seconds. How would you fix this problem if it was off though? Set the baud manually instead of using #use RS ...
  Topic: rs232 errors
mshearer

Replies: 5
Views: 5593

PostForum: General CCS C Discussion   Posted: Thu Feb 05, 2009 11:00 am   Subject: rs232 errors
looks like the getc(); is causing the problem. Reading straight from the register works fine. Should have known better
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group