Hades logo    Hades applet banner

TAMS / Java / Hades / applets (print version): contents | previous | next

PIC16C84 EEPROM access demo

PIC16C84 EEPROM access demo screenshot


This applet demonstrates the demo84 application from Arizona Microchip, which runs a selftest for the on-chip EEPROM memory of the PIC16C84 microcontroller. Because every EEPROM write access takes many clock cycles to complete, the program uses interrupts to wait for the write to finish. Because the PIC simulation model also implements this delayed writing, the simulation might seem to run very slowly - please be patient, or use the GUI to watch the program operation.

The program uses two endless loops. Each iteration of the outer loop increments an 8-bit counter value. The inner loop tries to write that counter value into all EEPROM locations. Once that value has been written to all EEPROM locations successfully, the value is also output on port B. Then, the counter value is incremented and the process repeats. If an error occurs during EEPROM write, the LEDs on port B are flashed approximately once per second. (However, this situation cannot arise in the simulation, because the simulated EEPROM write always succeeds.)

Run the applet | Run the editor (via Webstart)

Impressum | 24.11.06