May 31, 2011 #1 W wind_blast942 Newbie level 3 Joined May 19, 2011 Messages 3 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,301 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!
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!