ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

BUILDING A PRACTICAL EMBEDDED DEVELOPMENT SYSTEM


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

BUILDING AN EMBEDDED TIMING SYSTEM

Lessons from the Trenches by Jamie Pollock

Start ý Problem Solving ý EEPROM Programming ý Some Assemblyý ý Interfacing the LCD ý Sources and PDF

EEPROM PROGRAMMING

Next, the problem of programming the EEPROM exists. Because the bootloader program was written to relocate our program in RAM, a few modifications enable us to relocate our program into EEPROM. PCBUG11 could easily be used to perform this function. I felt that understanding the function of the EEPROM made it necessary to write the code myself.

Listing 2 is a robust version of the bootloader with some special EEPROM modifications. This code helps extend the EEPROM life by choosing which bytes need to be erased or programmed. The EEPROM in the ý6811 has a finite programming lifetime and this code utilizes Motorolaýs recommendations for extending the EEPROM life to its maximum.

Basically, the code decides first if the Source and the Target byte are the same. If they are, then it skips the erasing and programming sections for the byte. Itýs amazing how many times this actually occurs during development.

If the Target and Source are not the same, the code decides if the Target byte needs to be erased first (set to $FF). An EEPROM location in which the only changes are turning 1s into 0s doesnýt need the byte erased first. If the byte doesnýt need to be erased, the code jumps to the programming section.

Finally, if the Source and Target byte are sufficiently different, the erase code is executed followed by the programming code. Special registers are modified during erasure and programming. A good explanation of these functions and some example code are given in the ý6811 reference manual.

This method is good for developing the program. But, for the final product, the EEPROM will be entirely erased then programmed.

PREVIOUSNEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ýCircuit Cellar, the Magazine for Computer Applications. Posted with permission.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ