On Thu, Feb 07, 2002 at 10:50:06PM +1300, Jinx wrote: > > Have you read > > > > http://www.microchip.com/download/lit/suppdoc/errata/80073d.pdf > > > > It would seem there are some errors in the data sheet regarding > > EEPROM read/write - concerning the banks the registers are in > > I read this a couple of days ago. Although I'm not totally sure I'm > on top of this yet, what I've found disagrees with Example 13-2 > > In that piece of code, setting up for a write, eeadr and eedata > are loaded AFTER the bank has been changed to bank1 > > BSF STATUS,RP0 > MOVLW CONFIG_ADDR > MOVWF EEADR > MOVLW CONFIG_DATA > MOVWF EEDATA > > BSF EECON1,WREN > > In the routine I'm working on, that doesn't produce the correct > result because the data and address indices aren't in bank1 Yes they are. That's the error in the original data sheet. Everything for the data EEPROM is in bank one. You even switch to bank 1 in the code you posted yesterday "s/w writes reliably (AFAICT)" > > IMVHO, the errata sheet is misleading, or at least incomplete No. It's write from my brief review of it. > > If that's true, then it's a poor show. Microchip have these ICs > for a long long time before we get to play with them and the > documentation should be perfect. After all, these are digital > chips with entirely predictable behaviour True. But documentation is no fun. Mchip has a habit of simply transferring data from one chip to another. That's how a lot of errata results. BAJ -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics