The PIC1778 pin-out shown outlines the names of the PIC input-output port pins. Each of these pins
can also function as external connections to the various analog and digital functions that are
available on the PIC, with the exception of the
The PIC pin RE3 will be used as a 'Reset' input that restarts the PIC program when
connected to GND. The RC0 pin is used as a digital output connected to an LED.
Executing an instruction that changes the logic level at this pin will turn the LED on or off.
This pin will be used as a visual indicator and as a source of a digital signal that can be
monitored with the scope.
Pins RC6, RC7, RB4 and RB5 interface to a USB module that will be used to connect the PIC to a PC
and allow the PIC to be programmed with the picl1778
IDE (integrated development environment) software.
Before applying power to the USB module, verify that your circuit connections match those shown in the circuit schematic, then have the TA review your circuit. If all is well, reconnect the USB module. The PIC LED should light for around one second, then turn off. Press the Reset button; the LED should light and turn off as before. You now have a working PIC circuit.
With the PIC resetting as expected, the next step is to verify the USB connection.
Click File, New to clear the program entry window., then enter:
bsf PORTC,0 ;set the PORTC bit.0 pin RC0 to ~5VClick Build to load and run the instruction. The LED connected to RC0 should turn on and stay on. Change bsf to bcf and click Build to turn off the LED.
The following PIC code sets up a loop that turns the LED on and off. Edit the previous code as follows and monitor RC0 with the scope.
start bsf PORTC,0 ;set PORTC bit.0, pin RC0 outputs ~5V bcf PORTC,0 ;clear PORTC bit.0, pin RC0 outputs ~0V goto start ;repeat until 'Reset' button is pressed
Click File, New, then enter the code as shown. You need not enter all the comments, but do include those describing the instructions.