Skip to main content
Topic: Tips to read eeprom memory 24C44 (Read 77 times) previous topic - next topic

Tips to read eeprom memory 24C44

My intention is to manage this 24C44 eeprom memory to then do the routines with a pic.
The project is to revive an old team that is made with a motorola microcontroller, which I will replace with a pic.
To make things easier, I started by creating a map with data in ascending sequence of hex values and write it with the
minipro programmer that supports this type of memory.

The memory is 16 words ... very small, but it has a cache system in RAM, with the RCL command you copy
from the eeprom cells to the cache RAM.
It does not have an upward direction pointer and can only be read/write one word at a time indicating the direction of the word
to read/write.

Reading in 32x8 bytes mode.

Code: [Select]
$ minipro -p X24C44 -r- |hexdump -Cv
Found TL866II+ 04.2.124 (0x27c)
Reading Code...  0.01Sec  OK
00000000  00 01 02 03 04 05 06 07  08 09 0a 0b 0c 0d 0e 0f  |................|
00000010  10 11 12 13 14 15 16 17  18 19 1a 1b 1c 1d 1e 1f  |................|

Reading in 16x16 words mode.

Code: [Select]
$ minipro -p X24C44 -r- |hexdump -v
Found TL866II+ 04.2.124 (0x27c)
Reading Code...  0.01Sec  OK
0000000 0100 0302 0504 0706 0908 0b0a 0d0c 0f0e
0000010 1110 1312 1514 1716 1918 1b1a 1d1c 1f1e

I used buspirte 4 to investigate this issue using 3WIRE mode with the following connection diagram.

Code: [Select]
| Bus Pirate v4.0  | Dir. | CSI24C44 | Description                     |
|------------------|------|----------|---------------------------------|
| CS   red/violet  | →    | CE       | Chip Select                     |
| CLK  white/white | →    | SK       | Clock signal                    |
| MOSI black/black | →    | DI       | Master Out, Slave In            |
| MISO yellow/grey | ←    | DO       | Master In, Slave Out            |
| GND  white/white | ---  | GND      | power ground                    |
| N.C              | +    | RECALL   | jump to VCC (RCL only command)  |
| N.C              | +    | STORE    | jump to VCC (STO only command)  |
| +5   black/black | +    | VCC      | +5v power source                |


Code: [Select]
$ minicom -D /dev/ttyACM0
Welcome to minicom 2.7
Port /dev/ttyACM0, 20:23:20

HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. KEYB
9. PIC
10. DIO
x. exit(without change)

(1)>7
Set speed:
 1. ~5KHz
 2. ~50KHz
 3. ~100KHz
 4. ~400KHz

(1)>4
CS:
 1. CS
 2. /CS *default

(2)>2
Select output type:
 1. Open drain (H=Hi-Z, L=GND)
 2. Normal (H=3.3V, L=GND)

(1)>2
Clutch disengaged!!!
To finish setup, start up the power supplies with command 'W'
Ready

3WIRE>W
POWER SUPPLIES ON
Clutch engaged!!!

3WIRE>i
Bus Pirate v4
Community Firmware v7.1 - colodes 19-02-2021 [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE KEYB PIC DIO]
DEVID:0x1019 REVID:0x0003 (24FJ256GB106 A5)
http://dangerousprototypes.com
CFG0: 0xFFFF CFG1:0xFFFF CFG2:0xFFFF
*----------*
Pinstates:
#12     #11     #10     #09     #08     #07     #06     #05     #04     #03     #02     #01  
GND     5.0V    3.3V    VPU     ADC     AUX2    AUX1    AUX     CS      MISO    CLK     MOSI
P       P       P       I       I       I       I       I       O       I       O       O      
GND     4.91V   3.48V   0.00V   0.00V   H       H       H       H       H       L       L      
POWER SUPPLIES ON, Pull-up resistors OFF, Normal outputs (H=3.3v, L=GND)
MSB set: MOST sig bit first, Number of bits read/write: 8
a/A/@ controls CS pin
R3W (spd csl hiz)=( 3 1 0 )
*----------*

First you must send the RCL command [0x85] that copies the 16 words from the eeprom to RAM, otherwise only all zeros will be read.

Code: [Select]
3WIRE[-/\_/\_/\_/\_/\-/\_/\-/\]

This is the table to read from word 0 to word F.

Code: [Select]
3WIRE[-/\_/\_/\_/\_/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  0 -> 0100
3WIRE[-/\_/\_/\_/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  1 -> 0302
3WIRE[-/\_/\_/\-/\_/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  2 -> 0504
3WIRE[-/\_/\_/\-/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  3 -> 0706
3WIRE[-/\_/\-/\_/\_/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  4 -> 0908
3WIRE[-/\_/\-/\_/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  5 -> 0b0a
3WIRE[-/\_/\-/\-/\_/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  6 -> 0d0c
3WIRE[-/\_/\-/\-/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  7 -> 0f0e
3WIRE[-/\-/\_/\_/\_/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  8 -> 1110
3WIRE[-/\-/\_/\_/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  9 -> 1312
3WIRE[-/\-/\_/\-/\_/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  a -> 1514
3WIRE[-/\-/\_/\-/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  b -> 1716
3WIRE[-/\-/\-/\_/\_/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  c -> 1918
3WIRE[-/\-/\-/\_/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  d -> 1b1a
3WIRE[-/\-/\-/\-/\_/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  e -> 1d1c
3WIRE[-/\-/\-/\-/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]  f -> 1f1e

The secret of memory 24C44 is that it delivers the first bit D0 (LSB) when descending the eighth clock pulse, at the end of sending the READ 11x command.
For bit D0, no clock pulse is needed, for bits 1 to 15 clock pulses are sent, and each bit is read after each clock pulse falls.

The confusing part of this whole mess is that memory first sends the D0 LSB that order it cannot be changed in the interpretation by the buspirate, since the l/L
command does not work ... does not exchange the order of the bits read to present them properly In the terminal.
This function has the ponyprog 3.0 ported to QT and is called ByteSwap.
How difficult would it be to add it? since it is very confusing to interpret the bit order just by observation at the terminal.

The map obtained is identical to the one obtained using minipro.

Code: [Select]
0000000 0100 0302 0504 0706 0908 0b0a 0d0c 0f0e
0000010 1110 1312 1514 1716 1918 1b1a 1d1c 1f1e

As an example, I paste the reading of the word F which should give a read value of 0x1f 0x1e.

Code: [Select]
3WIRE>[-/\-/\-/\-/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]
CS ENABLED
DATA OUTPUT, 1
CLOCK, 1
CLOCK, 0
DATA OUTPUT, 1
CLOCK, 1
CLOCK, 0
DATA OUTPUT, 1
CLOCK, 1
CLOCK, 0
DATA OUTPUT, 1
CLOCK, 1
CLOCK, 0
DATA OUTPUT, 1
CLOCK, 1
CLOCK, 0
DATA OUTPUT, 1
CLOCK, 1
CLOCK, 0
DATA OUTPUT, 1
CLOCK, 1
CLOCK, 0
DATA OUTPUT, 0
CLOCK, 1
CLOCK, 0
DATA STATE: 0CLOCK, 1
CLOCK, 0
DATA STATE: 1CLOCK, 1
CLOCK, 0
DATA STATE: 1CLOCK, 1
CLOCK, 0
DATA STATE: 1CLOCK, 1
CLOCK, 0
DATA STATE: 1CLOCK, 1
CLOCK, 0
DATA STATE: 0CLOCK, 1
CLOCK, 0
DATA STATE: 0CLOCK, 1
CLOCK, 0
DATA STATE: 0CLOCK, 1
CLOCK, 0
DATA STATE: 1CLOCK, 1
CLOCK, 0
DATA STATE: 1CLOCK, 1
CLOCK, 0
DATA STATE: 1CLOCK, 1
CLOCK, 0
DATA STATE: 1CLOCK, 1
CLOCK, 0
DATA STATE: 1CLOCK, 1
CLOCK, 0
DATA STATE: 0CLOCK, 1
CLOCK, 0
DATA STATE: 0CLOCK, 1
CLOCK, 0
DATA STATE: 0/CS DISABLED
3WIRE>

Let's see if anyone has experiences with the 3WIRE mode and tells me how else this can be done more simply.

Greetings.

 

Re: Tips to read eeprom memory 24C44

Reply #1
It seems that there is no other simpler way to handle the 3WIRE mode since this 24C44 memory goes out of the standards by obtaining D0 without needing a pulse clock, that is, only 23 clock pulses are needed and not 24 to read a word.
I've been capturing the talk between the buspirate and the OLS 4-channel CSI24C44 memory using pulseview and discovered a bug in the sigrok X2444M/P decoder.
In the screenshots that I attach, it is seen that when sending the RCL command [0x85] there are no problems, pulseview shows it well. But when reading the last word 0xF it gets ugly wrong, showing the word read from the beginning of the first clock pulse, when it should be taken from bit 8 to bit 23 of the clock.
In the third capture I have added yellow bars and comments in orange and red to facilitate reading and demonstrate how wrong the X2444M/P plugin is.
I know that this type of archaic memories are very little seen and used, hence there is not much feedback to correct the bugs ... looking through the sigrok page there I finished finding out where the bugs should be reported.

The x2444m plugin is made in python, I understand something but not all the context in which the plugin works in sigrok.

Code: [Select]
# updatedb
$ locate x2444m
/usr/share/libsigrokdecode/decoders/x2444m/__init__.py
/usr/share/libsigrokdecode/decoders/x2444m/pd.py

RCL shipping.

Code: [Select]
3WIRE[-/\_/\_/\_/\_/\-/\_/\-/\]

I send READ 0xF, the word written in memory at address 0xF is 0x1F1E.

Code: [Select]
3WIRE[-/\-/\-/\-/\-/\-/\-/\_/\./\./\./\./\./\./\./\./\./\./\./\./\./\./\./\.]

Attached a screenshot of ponyprog-3.1.2 using SI-ProgAPI by serial port /dev/ttyS0 reading the same memory CSI24C44.

Greetings.