danielefilisetti
Joined: 27 Apr 2005 Posts: 3 Location: Italy
|
ADC on PIC16F91xx |
Posted: Thu May 05, 2005 3:21 am |
|
|
I got some problem using AD converter on PIC16F913.
It works unlike the other pic devices.
I set the ANSEL reg, the ADCON0/1, but it doesn't work correctly.
Somebody use AD on this device's family
Daniele |
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu May 05, 2005 12:52 pm |
|
|
Quote: | I got some problem using AD converter on PIC16F913.
It works unlike the other pic devices. |
What is your version of the CCS compiler ?
The version number is at the top of the .LST file, which is generated
when you compile a program. The version will be a number such as:
3.191, 3.223, 3.224, etc.
Quote: | I set the ANSEL reg, the ADCON0/1, but it doesn't work correctly. |
This sounds like you are setting the A/D registers directly.
You're not using CCS functions, such as:
setup_adc_ports()
setup_adc()
set_adc_channel()
read_adc()
If you want to skip the CCS functions and write your own code,
then you need to carefully study the data sheet. |
|