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.

[PIC] struct at overrun error and framing error in USART PIC18F4550

Status
Not open for further replies.

Harshal Dalal

Newbie level 3
Newbie level 3
Joined
Jul 23, 2014
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
23
I'm trying to communicate PIC18F4550 with biomed module. I'm very new to embeded My Module send a packet of 5 byte information continuously at 4800 baud, 1 stop, ODD parity. I've set my baud rate perfectly BRGH=1, BRG16=1. my main is
Code:
void main()
{

INTCON=0xC0;
RCSTA=0x80;
TXSTA=0x24;
BAUDCON=0x08;
PIE1bits.RCIE=1;
IPR1bits.RCIP=1;
SPBRGH=0x09;
SPBRG=0xC3;
RCSTAbits.CREN=1;
}
my isr is as
Code:
void uart_isr(void)
{ if(PIR1bits.RCIF=1)

for(i=0;i<32;i++)
    {
        PORTD=RCREG;
  if(RCSTAbits.OERR) 
    { PORTBbits.RB6=~PORTBbits.RB6;
      do{ 
        temp = RCREG; 
        temp = RCREG; 
        temp = RCREG; 
        RCSTAbits.CREN = 0; 
        RCSTAbits.CREN = 1; 
      }while(RCSTAbits.OERR); 
} 

        PORTD=PORTD-32;
        buff[i]=PORTD;
        myMsDelay(15);

    }   
} }

i'm getting lots of overrun. please suggest me some method to stop these error
THANK YOU
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top