Hello,
I am using PIC18F452 with MPLAB and HI-TECH compiler.
i write this code that take input and show the corresponding output. simulation showing that its working OK,
but when burn the hex file not taking the input.
#include<htc.h>
__CONFIG(1,OSCSDIS & HSPLL);
__CONFIG(2,PWRTDIS & WDTDIS & BORDIS);
__CONFIG(3,CCP2RC1);
__CONFIG(4,LVPDIS & STVREN);
__CONFIG(5, UNPROTECT);
__CONFIG(6,WRTEN);
__CONFIG(7,TRU);
void main()
{
TRISB4=1;
TRISD=0;
while(1)
{
if(!RB4)
{
PORTD=0x55;
}
else
{
LATD=0xFF;
}
}
}