PIC Trainer Board Initial Test Procedures ote: The LED_TEST. HEX AD _TEST.HEX files are available at www.ucdistancetraining.org then select Workshop or you can download it from www.ucdistancetraining.odu.edu The PIC Trainer Board is delivered with a pre programmed PIC16F84A microcontroller unit (MCU marked as 1 ) that contains code for testing the interface between the PIC and the LEDs (LED3 LED10), and with a blank PIC16F84A MCU (marked as 2 ) to be programmed for testing the both the programming function and the interface between the PIC and the Liquid Crystal Display () module. These tests are described below. The oscillator/resonator has been pre wired in BLUE or BLACK on the trainer board for you. There are three ribbon cables (one 8 lead and two 20 leads mixed colors in 3 and 6.5 length) with male heading for you do the testing and lab exercises of the trainer board. Please refer to the following photo 1: Photo1. Testing Wires: The 8 and 2 leads ribbon cables Test #1 PIC16F84A to LED TE: Refer to Figure 1 for guidance while making connections, setting switches, and inserting the PIC MCU. 1. Connect the eight pin jumper between PRTB_18P_ITER connector X10 and DB_I_ITER connector X6. The orientation of the jumper is not critical for this test. Interconnections presented in 8 Brown wires. Page 1 of 7
2. Connect two short jumpers between RESATR_ITER connector SV4, pins 1 and 3, and PRTA_18P_ITER connector pins 7 and 8. Interconnections presented in Blue or Black. (This has been done on the trainer for you already.) 3. Set switches S1 1 through 5 to FF and S1 6 through 10. 4. Set switches S4 1 to FF and S4 2 to. 5. Set switches S5 1 through 4 to and S5 5 through 8 to FF. 6. Set switches S6 1 through 8 to FF. 7. Lift the handle of the Zero Insertion Force (ZIF) socket, IC4. 8. Insert the preprogrammed #1 PIC16F84A into the ZIF socket. Make certain that the notch end of the PIC is facing the handle end of the socket and that the PIC is mounted closest to the handle end of the socket. 9. Lower the handle of the ZIF socket. 10. Plug the wall mounted power supply connector plug into the trainer board Power Jack, J1. 11. Plug the power supply into an outlet. TE: The program will run automatically when power is applied. The LEDs (LED3 through LED10) will turn on for about 0.5s and turn off for 0.5s. Then, LED3 LED6 will light for 0.5s and turn off for 0.5s, followed by LED7 LED10 turning on and off. This sequence will repeat until power is removed from the board. Page 2 of 7
1 S1: 1-5 FF & 6-10 Connections PRTA PRTB PIC16F84A S1 S6 1 2 3 4 5 6 7 8 S5 S4 1 2 3 4 5 6 7 8 9 10 1 2 S4: 1 FF & 2 2 3 4 5 6 7 8 LEDs FF S5: 1-4 & 5-8 FF utputs: RB0, RB1, RB2, RB3, RB4, RB5, RB6, RB7 Figure 1. LED Test Interconnections, Switch Settings, and PIC Placement Page 3 of 7
Power to Breadboard (ptions) PIC 1 S1: 1-5 FF & 6-10 S4: 1 FF & 2 LEDs FF S5: 1-4 & 5-8 FF Photo 2. Photo of LED Test Settings and PIC Placement Page 4 of 7
Test #2 Module Parallel Communications TE: Refer to Figure for guidance while making connections, setting switches, and inserting the PIC MCU. 1. Connect the eight pin jumper between PRTB_18P_ITER connector X10 and pins 1 8 of _ITER connector X29. Make certain that pin 1 of X10 is connected to pin 1 of X29. Interconnections presented in Brown. 2. Connect a two pin jumper between PRTA_18P_ITER connector X8, pins 1 (RA0) and 2 (RA1) and _ITER connector X29 pins 10 (E) and 9 (RS), respectively. ote that X8 pin 1 (RA0) is connected to X29 pin 10 (E) and X8 pin 2 (RA1) to X29 pin 10 (E). Interconnections presented in Red. 3. Connect a two pin jumper between X29, pins 11 (R/W) and 12 (Vo), to GD on connector X27, pins 3 and 4. This is the ground connection. Interconnections presented in Blue. 4. Connect two short jumpers between RESATR_ITER connector SV4, pins 1 and 3, and PRTA_18P_ITER connector pins 7 and 8. Interconnections presented in Blue or Black. (This has been done on the trainer for you already.) 5. Connect the 14 pin plug to the SV1 (_C) socket that is located by right corner of the breadboard. 6. Set switches S1 1 through 5 to FF and S1 6 through 10. 7. Set switches S4 1 to FF and S4 2 to. 8. Set switches S5 1 through 4 to and S5 5 through 8 to FF. 9. Set switches S6 1 through 8 to FF. 10. Lift the handle of the Zero Insertion Force (ZIF) socket IC4. 11. Insert the #2 PIC16F84A into the ZIF socket. Make certain that the notch end of the PIC is facing the handle end of the socket and that the PIC is mounted closest to the handle end of the socket. 12. Lower the handle of the ZIF socket. 13. Refer to the document Programming the PIC16F84 Using PICkit2 for instructions on programming the microcontroller. TE: Upon completion of programming, the program will run automatically and the will display the message **Congratulations** on the first line and ***Test Complete*** on the second line. If the LED test or programming is unsuccessful, or if the programming is successful, but the does not display the message, please contact Dr. Steve Hsiung (shsiung@odu.edu)(757 683 4606) or Richard Seriani (rseriani@tcc.edu)(757 410 7889) for assistance. Page 5 of 7
1 utputs: RA0=>E, RA1=>RS Connections PRTA PRTB S6 S1 1 2 3 4 5 6 7 8 S5 S4 1 2 1 2 3 4 5 6 7 8 9 10 S1: 1-5 FF & 6-10 S4: 1 FF & 2 2 3 4 5 6 7 8 utputs: RB0, RB1, RB2, RB3, RB4, RB5, RB6, RB7=> D0 to D7 FF S5: 1-4 & 5-8 FF Gnd R/W & Vo => Gnd Connector Figure 2. Test Interconnections, Switch Settings, and PIC Placement Page 6 of 7
Power to Breadboard (Required) PRTA Interfac PIC 2 S1: 1-5 FF & 6-10 S4: 1 FF & 2 PRTB Vo & R/W to GD FF Connection S5: 1-4 & 5-8 FF Photo 3. Photo of Test Settings and PIC Placement Page 7 of 7