How to use receive interrupt? - urgent

Status
Not open for further replies.

huanyong

New Member
this is my school projcect. i am developing a computer software by microsoft VB and use it to communicate with PIC. i am using pic16F628A and there are one receive interrupt bit on address 8Ch.

i pic basic i try to configure it like this:
PIE1=%00100000

but the interrupt didnt activated when my software sent the data. I am not sure also how to use recieve interrupt. may u guys help me to solve it? or is there any good website to learn how to handle the receive interrupt?
 
First you'll have to set the USART Transmit and/or receive interrupts on
Transmit interrupt is bit 4 (TXIE) of register PIE1
Receive interrupt is bit5 (RCIE) of register PIE1

Then you'll have to enable the perephial interrupts (bit6 - PEIE) of register INTCON

Then you'll have to enable global interrupts (bit7 - GIE) of register INTCON
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…