Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

external interrupt address

Status
Not open for further replies.

neelam29

New Member
if an timer overflow generates interrupt , the controller goes to location
ORG 0x04
so,when an external interrupt is generated where will the controller jump to ,i mean which address

org......?
and if it is same 0x04 ,then how will microcontroler differentiate between the two interrupts?

m using pic16f628a and pic16f877a

thanks
 
the pic will go to ORG 0x04 in any interrupt. Then you just check different interrupt flags to find out which interrupt occurred.
 
thanks for replying could u please tell me one more thing ...how to complement a bit in pic.cause comf instruction is used to comple ment the whole register......which instruction is used to complement only a bit ...
 
check this link: **broken link removed**
 
neelam29 said:
thanks for replying could u please tell me one more thing ...how to complement a bit in pic.cause comf instruction is used to comple ment the whole register......which instruction is used to complement only a bit ...

You can use the XOR instruction to complement a bit.
To complement bit 5 you would do,
Code:
         movlw   b'00100000'
         xorwf   Location,F
Mike.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top