I'm looking at the analog port configuration section of the CCS 18F2620 support file and the codes associated with selecting active analog input channels... The following is a snippet of the file:
From the Microchip 18F2620 datasheet, the codes match from 0x0f, 0x0e, 0x0d, 0x0c, and 0x0b but the datasheet lists entries for AN4 (on pin 6 of the 18F2620) and the CCS doesn't seem to list any entries for the AN4. None of the rest of the codes seem to match.
I'm trying to set up for 8 analog inputs with a PIC18LF2620 or 18LF2525 device. Which code should I use and which pins will the analogs be input onto?
Thanks.
Code:
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sun Aug 19, 2007 6:31 pm
Look at the PCFG-bits table in the A/D section of the 18F2620 data sheet:
Quote:
ADCON1: A/D CONTROL REGISTER 1
PCFG3:PCFG0: A/D Port Configuration Control bits
Quote:
CCS doesn't seem to list any entries for the AN4
For AN0-AN4 as analog, the table has the value of 0x0A.
Also note that AN5-AN7 are not available on the 18F2620. Microchip
places this note below the table:
Quote:
2: AN5 through AN7 are available only on 40/44-pin devices.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum