wind_blast942
Newbie level 3
![Newbie level 3](/styles/images/ranks/alevel3.gif)
I am trying to recieve 1 character using the USART feature on PIC 16.
Both the transmitter and receiver are both PIC 16s.
Can i check if the way to call the receive function is correct conceptually
char tmp;
CREN = 0;
CREN = 1;
while(!RCIF);
if(OERR==1)
{
tmp = RCREG;
tmp = RCREG;
CREN=0;
DelayMs(5);
CREN=1;
}
else
{
tmp = RCREG;
}
CREN = 0;
Many thanks in advance!
Both the transmitter and receiver are both PIC 16s.
Can i check if the way to call the receive function is correct conceptually
char tmp;
CREN = 0;
CREN = 1;
while(!RCIF);
if(OERR==1)
{
tmp = RCREG;
tmp = RCREG;
CREN=0;
DelayMs(5);
CREN=1;
}
else
{
tmp = RCREG;
}
CREN = 0;
Many thanks in advance!