CPC507
C P C 5 0 7 U s e r M a n u a l
43
3.4.2
Programming the SPI device
The work with FRAM is carried out in the I/O area at addresses 310h-313h.
Writing data byte (32h) to FRAM at the address (144h)
MOV DX, 310H
MOV AL, 44H
OUT DX, AL
MOV DX, 311H
MOV AL, 01H
OUT DX, AL
MOV DX, 312h
MOV AL, 32h
OUT DX,AL
Reading data byte from FRAM at the address (101h)
MOV DX, 310H
MOV AL, 01H
OUT DX, AL
MOV DX, 311H
MOV AL, 10H
OUT DX, AL
MOV DX, 312h
IN AL,DX
Reading data packet from the three FRAM data bytes, starting from the address 208h
MOV DX, 310H
MOV AL, 08H
OUT DX, AL
MOV DX, 311H
MOV AL, 20H
OUT DX, AL
MOV DX,313h
MOV AL, 01H
OUT DX, AL ;
enabling packet mode
MOV DX, 312h
IN AL,DX
; reading data byte at the address 208h
…
IN AL,DX ;
reading data byte at the address 209h
…
IN AL,DX ;
reading data byte at the address 20Ah
…
MOV DX,313h
MOV AL, 00H
OUT DX, AL ;
disabling packet mode
3.4.3
FRAM with sequential access
The module has a FRAM memory chip with sequential access on the SPI bus. This non-volatile
memory is used to store BIOS settings and user data. Access to the microchip is possible through
the SPI controller registers (see subparagraph 3.4.1). The microchip has a capacity of 32 KB, the
last kilobyte is reserved for storing service data and BIOS Setup settings (not available to the
user).