AN1241 Motorola Semiconductor Products, AN1241 Datasheet - Page 2
![no-image](/images/no-image-200.jpg)
AN1241
Manufacturer Part Number
AN1241
Description
Interfacing the Mc68hc705j1a to 9356/9366 Eeproms
Manufacturer
Motorola Semiconductor Products
Datasheet
1.AN1241.pdf
(21 pages)
Communication between the MC68HC705J1A and the 9356 is done with a synchronous serial protocol. As
mentioned earlier, the MC68HC705J1A bit programs its I/O pins to communicate with the 9356. A timing
diagram of the serial link can be found in the 9356 data sheet if needed.
The 9356 will accept seven different commands. They are as follows:
The 9356 transmission format is a frame of data bits containing an opcode, an address, and if needed, a
word of data. The opcode is three bits long, the address is eight bits long, and the data word is 16 bits long.
Table 1 illustrates the bit information each instruction needs.
Software was written to provide subroutines to perform each of the seven commands. A total of four bytes
of RAM are needed to support the subroutines. These bytes are described below.
As needed, each EEPROM command subroutine will call other supporting subroutines to execute the
transmission of data between the MC68HC705J1A and the 9356. Appendix B contains flowcharts for all of
these subroutines.
2
1)
2)
3)
4)
5)
6)
7)
1)
2)
3)
4)
READ —
WRITE —
WRALL —
ERASE —
ERAL
WEN
WDS
OP_CODE — Contains the opcode needed for the command
ADDR
DATA_H
DATA_L
—
—
—
— Contains the address for the command
— The high byte for the data word
— The low byte for the data word
Read a 16-bit data word from an address in memory
Write a 16-bit data word from an address in memory
Write all addresses with the same 16-bit data word
Erase a 16-bit data word from an address in memory
Erase all addresses within the memory map
Erase/write enable the EEPROM memory
Erase/write disable the EEPROM memory
Instruction
ERASE
WRALL
WRITE
READ
ERAL
WEN
WDS
Freescale Semiconductor, Inc.
For More Information On This Product,
IMPLEMENTATION AND TEST
SOFTWARE INTERFACE
Go to: www.freescale.com
Opcode
110
100
111
100
101
100
100
Table 1.
11XXXXXX
10XXXXXX
01XXXXXX
00XXXXXX
Address
A7–A0
A7–A0
A7–A0
D15–D0
D15–D0
Data
AN1241/D