This TEST ROUTINE is supplied in the chip when you buy a kit. It is removed
when any other program is "burnt" into the chip. You
may need to use it (or some of the sub-routines), at a later date. That's why it
has been presented here. It is included in
All PicLab-1.hex
To use the TEST ROUTINE, build the PIC LAB-1 and go over the construction, making sure all the components have been fitted and all connections are soldered perfectly. Fit the 4 cells to the battery holder. Fit the pre-programmed PIC16F84 chip to an 18 pin IC socket, supplied in the kit as a spare IC socket (to make the chip easier to fit and remove from the Multi Chip Programmer) and the project is ready for testing. There is one slight problem with the Test Routine. Some constructors find it difficult to get past the AUdiO loop of the program and into the POt loop. The best thing to do is fit the microphone and pot to the board before turning the project on. You are now ready to perform the Test Routine: Turn the project ON and the row of 8 LEDs will scan across and back. The individual segments of the 7-segment display will also turn ON. Push button "A." The letters "Pb" will show on the 7-segment display - for "Push button." Push button "A" again and the top 4 LEDs will blink, followed by the lower 4 LEDs. Push button "A" again. The letters "AUdiO" will show on the display. Push button "A" again. The microphone will already be fitted to the 2-pin plug marked "MIC." Talk or whistle into the microphone. The lowest LED will turn ON to indicate audio. While whistling into the microphone, push button "A" again. It is important to whistle while pushing button "A" to get the micro to enter the next loop. The letters POt will flash on the 7-segment display. Push button "A" again. The pot will already be fitted into the 2-pin plug labelled "Pot." Rotate it in both directions. The 7-segment display will indicate rotation. All the input and output devices are now tested. Push button "A" to repeat the sequence. TEST ROUTINE PROGRAM Many of the sub-routines in the Test Routine will be very handy when you are designing your own program. At the moment they are too complex to understand. The Experiments in this course start with very simple routines and carry out a single function. After testing the project, go to the start of the experiments: Expt 1.asm The TEST ROUTINE is an example of linear programming. This is very simple programming where the microcontroller advances down the program into self-contained sections. You don't have the problem of jumping up and down the program looking for faulty instructions. When writing the program, each section is written and tested before going to the next section. This will make the program longer, but much easier to diagnose.
![]() |