/*
* Project name:
PIC Development Board LED and Keypad code
* Copyright
(c) Researchdesignlab.com
* Test configuration:
MCU: PIC16F877A
Dev.Board: PIC
Oscillator: 20.0 MHz
Software: mikroC PRO for PIC v 4.6
Developer: DD
*/
sbit LED1 at RB0_bit; //defining PortB Pin B0 as LED1
sbit LED2 at RB1_bit; //defining PortB Pin B1 as LED2
sbit LED3 at RB4_bit; //defining PortB Pin B4 as LED3
sbit LED4 at RB5_bit; //defining PortB Pin B5 as LED4
void main()
{
TRISB=0x00; //defining PORTB as output port
PORTB= 0XFF;
Delay_ms(1000);
PORTB= 0X00;
Delay_ms(1000);
while(1)
{
PORTB=0xFF; //binary equivalent value:00000000
Delay_ms(1000);
PORTB=0x00; //binary equivalent value:11111111
Delay_ms(1000);
}
}