Hades logo    Hades applet banner

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

PIC16C84 microcontroller demonstration (nightrider, internal clocked)

PIC16C84 microcontroller demonstration (nightrider, internal clocked) screenshot

Description

A first demonstration of the FastPic16F84 microcontroller model, again with the 'nightrider' program to drive a few LEDs.

Unlike the standard Pic16C84 microcontroller used in the previous applet, the 'FastPic16C84' simulation model does not require an external clock signal. Instead, it creates a suitable clock signal internally, whose clock period can be specified via the GUI. This means that the simulator does not need to spend most of the simulation time processing lots of clock events, but just executes 'useful' processor cycles and external events. The result is that the simulation runs much faster compared to the standard simulation model.

The program loaded into the microcontroller drives a few LEDs connected to the port B outputs in 'nightrider' fashion. This design is also a very good start to play with a real PIC16C84 microcontroller on a prototyping bread-board - program it with the .hex file, add some LEDs, and switch on the power!

The speed of the animation is controlled by wait loops in the PIC microcontroller program whose limits were set during assembly. If the simulation runs too slow (or fast :-)), you can edit the assembly code and re-assemble, or open the microcontroller GUI and change the values of the wait loop initialization manually. The corresponding movlw C8 instructions are at program addresses 00F and 001 and load the value C8 first into the W register. You can change those instructions to something like movlw 10 to reduce the wait counter initialization value, which makes the animation much faster.

Again, note that the simulation runs very slowly while the PIC GUI window is open, because most of the processor time is spent redrawing the processor register and memory windows. Uncheck the 'update' checkbox to disable redrawing of the registers to watch the simulation at normal speed.

Run the applet | Run the editor (via Webstart)


Impressum | 24.11.06
http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/72-pic/05-walk/fast-walk_print.html