Skip to main content

Posts

Showing posts from July, 2017

I/o port pic microcontroller programming using miKroC and CSS

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-modify write Operatio

LED Blinking project using PIC Microcontroller using PICC,miKroC and proteus

Blinking LED using PIC Microcontroller( PIC18F4580) 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. Proteus simulation for blinking LED  project Before going to the programming you should understand the following things. When a digital I/O operation is required, then register TRIS defines the direction of the I/O. Setting  a bit position to zero con figures the line as an input, setting the bit position to 1 configures the line as an 'output'.  For instance,   PORTA0