MicrowireEEPROM icon indicating copy to clipboard operation
MicrowireEEPROM copied to clipboard

Reading S 93C76 A : Good Waveform, Incomplete Serial Output

Open kenny56 opened this issue 5 years ago • 1 comments

i used tim's library to create a UNO sketch to read a blank new 512 word x 16-bit eeprom (all memory registers come filled with 0xFFFF), so i used pagesize of 16 and ADW of 9.

The issue is that the serial print output was only displaying the contents as 0x7FFF, it was not showing the highest bit, as if using signed INT. So i tried changing to unsigned INT, also tried word, uint16_t, etc to get the display correct, but nothing worked. e.g.

old = int r = ME.read(addr); new = unsigned int r = ME.read(addr); no change, this did not correct the problem.

i checked the waveform with a scope to verify that the chip was sending the values correctly, and the library works properly to send the read opcode and address as shown in the following picture, reading the last register address at 0x1FF. The chip does output the leading zero followed by the contents b1111 1111 1111 1111. Yellow trace is the Clock, blue trace is DI, green trace is DO. [i had 10k pulldowns on the input signals but no decoupling capacitors, so noisy on DO when low, but should not be a problem.]

Imgur

i tried changing the data type in the library functions for "dout", but no luck either.

i think there is some issue with the left bitshift or compound OR used to determine dout. i changed the left shift "i" value to see what was happening, with i-1 it read 0xBFFF, with i-2 it read 0x5FFF, with i+1 it was reading a negative number, and with just i (or i+0) it was 0x7FFF. So the leading zero could be shifted to different bit positions, but i could never eliminate it from the 16-bit value. i don't have anymore time to troubleshoot this, but i did find another github library that did work, at https://github.com/TauSolutions/M93Cx6. Good Luck, kenny

kenny56 avatar Nov 02 '19 14:11 kenny56

I have had great results programming 256 x 16 93c56 chips with this lib, adw set to 8.

wimbylanyon avatar Oct 24 '22 21:10 wimbylanyon