Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Correct Way of using USART on PIC 16

Status
Not open for further replies.

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!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top