AN1241 Motorola Semiconductor Products, AN1241 Datasheet - Page 3

no-image

AN1241

Manufacturer Part Number
AN1241
Description
Interfacing the Mc68hc705j1a to 9356/9366 Eeproms
Manufacturer
Motorola Semiconductor Products
Datasheet
Each EEPROM command subroutine has input data and output data. This data is inherent with some
commands while others need the information passed to them before the subroutine is called. Table 2 lists
the input data needed and output data generated for each of the seven commands.
Code was written and tested with a level of quality equal to the Carnegie-Mellon Software Engineering
Institute (SEI) Level 2. A test routine consisting of writing and reading the EEPROM is listed in Appendix C.
Refer to Appendix A for the schematic used in the design and test of the software. An LED is used to verify
that the test code works properly. The test routine executes the following:
For increased reliability, the software watchdog on the MC68HC705J1A is used. Also, a low voltage inhibit
circuit, the MC34064, is used to decrease susceptibility to brown out or short power failure conditions.
This application note has described the interface needed to successfully communicate between the
MC68HC705J1A and the 9356. For more information on the MC68HC705J1A, please consult the
Technical Data Manual, MC68HC705J1A/D. Contact National Semiconductor or SGS Thompson for
technical data on the 93XX series of EEPROM memories.
An electronic copy of the code listing in Appendix C and a listing of the test program to fully test all the
EEPROM commands can be found on the Freescale MCU BBS. The BBS number is (512) 891-3733. The
filename is j1a_9356.arc and is on the CSIC BBS under the APPNOTES directory.
Also, Freescale Application Note AN1221/D further details the software and hardware interfaces needed
between the 93XX series and other HC05 MCUs.
AN1241/D
1)
2)
3)
4)
5)
6)
7)
8)
Initializes the port on the HC705J1A for serial transmission. LED is turned off.
Writes EEPROM address $00 with $AA55.
Writes EEPROM address $20 with $1234.
Reads EEPROM address $00 and stores it to RAM location TEST1 and TEST2.
Reads EEPROM address $20 and stores it to RAM location TEST3 and TEST4.
Checks if TEST1 = $AA, TEST2 = $55, TEST3 = $12, and TEST4 = $34.
If check is good, then light the LED. If check is bad, do not light the LED.
Continue to run in an infinite loop until reset.
Command
ERASE
WRALL
WRITE
EWEN
EWDS
READ
ERAL
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
ADDR & DATA_H/L
Subroutine Input
SUMMARY
DATA_H/L
Table 2:
ADDR
ADDR
Subroutine Output
DATA_H/L
3

Related parts for AN1241