Author |
Message |
Topic: Help With Numbers |
rtracy
Replies: 4
Views: 6920
|
Forum: General CCS C Discussion Posted: Thu Apr 27, 2006 3:42 pm Subject: Help With Numbers |
Thanks!
See this thread for the long_delay_us() function:
http://www.ccsinfo.com/forum/viewtopic.php?t=16656&start=1 |
Topic: Help With Numbers |
rtracy
Replies: 4
Views: 6920
|
Forum: General CCS C Discussion Posted: Wed Apr 26, 2006 7:15 am Subject: Help With Numbers |
The delay_x statements only take an 8 bit variable. They will take a 16-bit constant.
Thanks, Rberek. Reading the manual is key.
I was trying to take a value directly from the 10bit ADC and ... |
Topic: Help With Numbers |
rtracy
Replies: 4
Views: 6920
|
Forum: General CCS C Discussion Posted: Wed Apr 26, 2006 6:34 am Subject: Help With Numbers |
This version works just fine for making a test pulse.
#use delay(clock=4000000)
int y;
int16 low,high;
void main()
{
setup_adc_ports(AN0);
setup_adc( ... |
Topic: Help with 16F877A and ADC |
rtracy
Replies: 9
Views: 16024
|
Forum: General CCS C Discussion Posted: Fri Oct 14, 2005 7:34 am Subject: Help with 16F877A and ADC |
Thank you for taking the time to test my code.
I can change back to channel 0 and it stops working on all three of my 877A chips. I'm going to just use the other channels for now.
I took your ... |
Topic: Help with 16F877A and ADC |
rtracy
Replies: 9
Views: 16024
|
Forum: General CCS C Discussion Posted: Thu Oct 13, 2005 4:01 pm Subject: Help with 16F877A and ADC |
Post your compiler version and also post what PIC you're using.
Your compiler version can be found at the top of the .LST file in
the project directory. It will be a number like 3.191, or 3.236, ... |
Topic: Help with 16F877A and ADC |
rtracy
Replies: 9
Views: 16024
|
Forum: General CCS C Discussion Posted: Thu Oct 13, 2005 2:55 pm Subject: Help with 16F877A and ADC |
I changed the ADC channel from 0 to 1 and it works fine. I haven't the slightest idea why it won't work correctly on channel 0.
set_adc_channel(0);
I'd really like to know what's going on i ... |
Topic: Help with 16F877A and ADC |
rtracy
Replies: 9
Views: 16024
|
Forum: General CCS C Discussion Posted: Thu Oct 13, 2005 1:41 pm Subject: Help with 16F877A and ADC |
I think the ADS is 10bits but the read is 8bits.
edit : have you test with 0 and 5vdc ?
Yes, I've tested with 0 and 5VDC. I've even tried using the external voltage references with the same res ... |
Topic: Help with 16F877A and ADC |
rtracy
Replies: 9
Views: 16024
|
Forum: General CCS C Discussion Posted: Thu Oct 13, 2005 1:23 pm Subject: Help with 16F877A and ADC |
I'm trying to write a basic program that will show that ADC is working on a PICDEM 2 board. I'd like to see a 5VDC signal on RA0 light RB3 and then scaled down from there. Using the variable resisto ... |
|