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.

Serial interrupt in pic16f877a

Status
Not open for further replies.

coolvasanth07

Member level 1
Joined
Sep 25, 2012
Messages
37
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,506
Hi, i need help for serial interrupt coding....am using hi-tech c and pic16f877a...

>>thanks in advance....
 

If you mean SPI or I2C:
Set GIE/GIEH (bit 7 of INTCON register). Set PEIE/GIEL (bit 6 of INTCON register). Clear SSPIF (bit 3 of PIR1 register). Set SSPIE (bit 3 of PIE1 register). That's the setting for interrupt. Set up the MSSP module for required operation. Do the necessary actions in the ISR (Interrupt Service Routine).

If you mean UART:
Set GIE/GIEH (bit 7 of INTCON register). Set PEIE/GIEL (bit 6 of INTCON register). Clear TXIF (bit 4 of PIR1 register). Clear RCIF (bit 5 of PIR1 register). Set TXIE (bit 4 of PIE1 register) for transmission interrupt. Set RCIE (bit 5 of PIE1 register) for reception interrupt. Set up the USART module for required operation. Do the necessary actions in the ISR (Interrupt Service Routine).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top