Academic Program

8-bit PIC MCU Digital I/O Interface

8-bit PIC MCU Digital I/O Interface

Almost every pin on the 8-bit PIC18 MCU can be used as a digital input or output pin. The digital pins all share the following attributes:

    • Ability to monitor digital inputs
    • Control digital output signals
    • Internal weak pull-ups
    • Multiplexed with peripherals
    • High drive capability (up to 25 mA sink/source on many I/O pins)
    • Direct single-cycle bit manipulation
    • 4 kV ESD protection diodes

port-b

The diagram shows the eight pins of RB0 to RB7 for the PORT B I/O port.

 

Getting a digital I/O pin to control a Light Emitting Diode (LED) can be a rewarding project in itself. It confirms that you have completed the software build, the hardware connection, and were able to program the MCU successfully. For this reason, this first project will step through a simple example of flashing an LED from an MCU pin.