There are numerous mistakes in many of the Microchip datasheets - I've found a few on the eeprom examples in some of the 16F datasheets -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Jake Brownson Sent: 25 April 2005 14:55 To: piclist@mit.edu Subject: [PIC] Am I crazy or is this datasheet? Whoops forgot to tag it the first time... Here is the sample code given in Microchip's datasheet for the PIC18F4525 (DS3926B) Page 105 the pdf can be found here: http://ww1.microchip.com/downloads/en/DeviceDoc/39626b.pdf CLRF PORTA ; Initialize PORTA by ; clearing output ; data latches CLRF LATA ; Alternate method ; to clear output ; data latches MOVLW 07h ; Configure A/D MOVWF ADCON1 ; for digital inputs MOVWF 07h ; Configure comparators MOVWF CMCON ; for digital input MOVLW 0CFh ; Value used to ; initialize data ; direction MOVWF TRISA ; Set RA<7:6,3:0> as inputs ; RA<5:4> as outputs I see two problems... MOVWF 07h should be a MOVLW 07h as far as I can tell, and shouldn't we actually put 0fh into ADCON1? I'm not crazy, right? I see nothing about this in the errata ~Jake B -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 21/04/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 21/04/2005 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist