kerden
Junior Member level 3
My problem as follow.and i emluator in ICD2, the progam can send out the data. but it can't receive any data, and it can run into the interrupt.
what's wrong?
thank you!
what's wrong?
thank you!
Code:
void init_com()
{
SPBRG = 0x23;
TXSTA = 0x04;
RCSTA = 0x90;
TRISC = 0x80;
INTCON |= 0xc0;
PIE1 |= 0x20;
}
main()
{
init_com();
while(1);
}
void interrupt Data_Rec(void)
{
if(RCIF)
{
data = RCREG;
}
}