AN1227 Using 9346 Series Serial EEPROMs with 6805 Series Microcontrollers Application note
●Abstract
■This application note describes how the HC05 Family of microcontrollers (MCU) can be used with 93 x 6 series serial electrically erasable programmable read-only memories (EEPROMs). The MCUs are made by various manufacturers such as National Semiconductor, SGS Thompson, Catalyst, and Microchip. This series includes serial EEPROMs whose base numbers are 9346, 9347, 9356, 9357, 9366,9367, 32C101, and 33C102. These EEPROMs are based on a loose standard; however, commands to initiate the basic functions are identical. This application note also can be helpful using I2C EEPROMs when they are used in conjunction with the Freescale application note Interfacing the MC68HC05C5 SIOP to an I2C Peripheral(AN1066/D) by Naji Naufel.
■Serial EEPROMs have become an inexpensive way to maintain small amounts of non-volatile data in microcontroller systems during power off.They commonly come in 1-K (128 x 8), 2-K (256 x 8), and 4-K (512 x 8)sizes. Unlike flash memory chips, they do not take special voltages, but on average they do require 4 milliseconds (ms) to execute each word-write operation.
■Several series of serial EEPROMs are available. This application note describes a method to use 9346 series serial EEPROMs with HC05 Family microcontrollers. The 9346 series uses a serial 3-wire interface.Along with chip select (CS), the three communications wires are clock(CLK), data out (DO), and data in (DI).
■In this application note, all seven basic 9346 commands are described in Table 2 and source code is included in Appendix H,Appendix I, and Appendix J. These seven commands are erase enable (EWEN), erase disable (EWDS), write (WRITE), erase all (ERAL), write all (WRAL),erase a memory location (ERASE), and read a memory location(READ).
■Different software algorithms that use serial EEPROMs are included.The first method uses polling and ordinary input/output (I/O) lines. The second method uses the serial peripheral interface (SPI) and polls it for status. The third method also uses the SPI communications port, but obtains status by using the SPI interrupt.
■The first method of polling port pins requires four I/O lines; three of them can be shared with other peripherals. Three memory locations are also used. These locations can be shared by other tasks, also. This is a more appropriate implementation when reading and writing the EEPROM occurs infrequently or when a low-cost member of the HC05 Family is used.
■The second implementation differs from the first because it uses the SPI and polls it for status. All of the bit shifting done in software in the first application is done by the SPI hardware in the second method.
■The third implementation uses the SPI and the SPI interrupt to save processing time during WRITE. This is an appropriate approach when writing occurs frequently or when the processor cannot be occupied in a loop for the 4-ms interval required for each byte write.
■Because differences exist among vendors, options to look for in 9346 series EEPROMs are described in the following section. The included source code in Appendix H,Appendix I, and Appendix J contains assembler switches to handle the various types of 9346 EEPROMs.
■This application has been tested with EEPROMs made by Microchip,National Semiconductor, SGS Thompson, and ICT. The test used an M68HC05EVM evaluation module with an MC68HC705C8P C8-resident processor that was assembled using the P&E assembler,IASM05.
9346 、 6805 、 9347 、 9356 、 9357 、 9366 、 9367 、 32C101 、 33C102 |
|
|
|
Application note & Design Guide |
|
|
|
Please see the document for details |
|
|
|
|
|
|
|
English Chinese Chinese and English Japanese |
|
2019/12/27 |
|
Rev. 1.0 |
|
AN1227;AN1227/D |
|
2.2 MB |
- +1 Like
- Add to Favorites
Recommend
All reproduced articles on this site are for the purpose of conveying more information and clearly indicate the source. If media or individuals who do not want to be reproduced can contact us, which will be deleted.