Code:
if(PORTBbits.RB0 == 1)
{
// while(!PORTBbits.RB0);
//PORTBbits.RB2 =~ PORTBbits.RB2;
while (BusyUSART());
//value sent
putcUSART(0xCE);//c
while (BusyUSART());
//value sent
putcUSART(0x01); //c1
while (BusyUSART());
//value sent
putcUSART(0x42);//c2
while (BusyUSART());
//value sent
putcUSART(0x03);//c3
while (BusyUSART());
//value sent
putcUSART(0xB9);//c4
}
if(PORTAbits.RA4 == 1)
{
//while(!PORTAbits.RA4);
//PORTBbits.RB3 =~ PORTBbits.RB3;
while (BusyUSART());
//value sent
putcUSART(0xCE);//c
while (BusyUSART());
//value sent
putcUSART(0x01); //c1
while (BusyUSART());
//value sent
putcUSART(0x44);//c2
while (BusyUSART());
//value sent
putcUSART(0x03);//c3
while (BusyUSART());
//value sent
putcUSART(0xB7);//c4
}
hi there... i hv implemented switches for this code.. if rb0 is pressed, the 1st set of msg is to be send.. if ra4 is pressed, the 2nd set of msg is to be send... the problem now is that i cant send both of them.. when i presssed, no byte comes out...
is it becoz of my conditions?