PIC I/O Port Programming (PIC18F4580) we discussed in my last post that All digital I/O’s are grouped together into “Ports”, called A, B ,D. Here GPIO means “general purpose input output”. The PIC18F4580 features a total of 36 I/O-pins, called PORTA to PORTD. But there’s more. The device comes with so many additional internal units, that not all features could be connected to dedicated pins of the device package at any one time. The solution is: multiplex. This means, one single physical pin of the device can be used for different functions and it is up to the programmer to decide which function is selected. Lets dive deep to grasp the some operations which we can perform with I/O PORTS. Each port has 3 registers for its operation: • TRIS register (Data Direction register) • PORT register (reads the logic levels on the pins of the device) • LAT register often known as (output latch) The data latch (LAT register) is helpful for read-modi...
Your number one source to learn about PIC microcontroller. We're dedicated to providing you the basic but very best PIC controller tutorials, with an emphasis on simulation with Proteus.