bhaskarc91
Newbie level 1
Hello.
I am using a PIC18F4550 and Hi-Tech C to write a simple LED blinking program on all PORTB pins. However, there is neither a high nor a low on any of the pins.
Here is my code:
Please help.
I am using a PIC18F4550 and Hi-Tech C to write a simple LED blinking program on all PORTB pins. However, there is neither a high nor a low on any of the pins.
Here is my code:
Code:
#include<htc.h>
#include<pic18f4550.h>
#define _XTAL_FREQ 20000000
__CONFIG(1,PLLDIV_1 & CPUDIV_OSC1_PLL2 & USBDIV_1 & FOSC_HS);
__CONFIG(2,PWRT_ON & BOR_OFF & WDT_OFF);
__CONFIG(3,MCLRE_ON & PBADEN_OFF);
void main() {
TRISB = 0x00;
while (1) {
PORTB = 0xff;
}
}