..........e to a Microchip 93AA66 EEPROM > (trying to anyway). The data book timing waveforms show different > clocking than the descriptions. For example, the timing diagrams show > that when Reading, data bits are clocked in on the negative edge > (falling) while the description specifically says that "Opcode, address, > and data bits are clocked in on the positive edge fo the CLK. Data bits > are also clocked out on the positive edge of the CLK." > Huh???? The same problem comes up when Writing to the EEPROM as well. > > So..., does anyone have code to read and write to a 93AA46/56/66 part? > Can I have a look at it? ........snip I just finished writing a segment but its at home and im at work. as i recall, i did something like pull chip select high say its on porta1 and hold it while tick (a bsf on porta2) untick (a bcf on porta2) first databit ( might have had a nop for a spacer) Tick, untick, etc. The three chips have different instruction lengths, so i had to rewrite the instruction byte going from the 9346 to the 56 but 66 is the same as 56 Easiest to just spell the instructions out one bit at a time rather than get cute with a loop. Data, since its all 8 bits to a byte, can be done with a countdown loop. read on a3 write on a0 or some such. There were a few nops here and there for spacers. Then bring chip select down when finished.. The datasheet diagrams dont specifically show the difference between the number of ticks for the different chips. But there is a big table that does compare them. Look hard at the total number of ticks the instruction uses, then count the ticks in your porgram. if it needs 18 ticks to do a write, make sure there are 18. The trickiest part was realizing that the instruction length was different, also that the chip is hardwired differently depending on whether 16-bit or 8-bit words are needed. i think it took about 12 hours of fiddling to get it to work. and my brain hurt.