MCU User Forum
  general question about external interrupts?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   general question about external interrupts?
trc4000
Member
posted September 05, 2010 10:43 PM     Click Here to See the Profile for trc4000     Edit/Delete Message
i would like to use a external interrupt in my program to detect the falling edge of a hall effect sensor input. Currently i am able to read of Bit 0.0 on the C8051F120. I would like to change this to Bit 2.5 . I am currently using external interrupt 1. How would make the ammendment to make it work on bit 2.5 . Any guidelines of how to change will be greatly appreaciated. thanks

IP: Logged

Scotty
Member
posted September 06, 2010 12:21 AM     Click Here to See the Profile for Scotty     Edit/Delete Message
Hi trc4000,

I would like to change this to Bit 2.5 . I am currently using external interrupt 1. How would make the ammendment to make it work on bit 2.5 .
Not directly possible due to the limitations of the crossbar.
1) You can enable all peripherals which lay before #INT1 to shift it to P2.5, but then all ports from 0.0 to 2.4 are lost for the application. If you need these functions anyway, then it's no problem.
2) The other approach I can see to get it to P2.5 is to poll the input, either via a timer or directly in the application.
3) Connect the signal to the comparators rather than to P2.5. With comparator properly set up you can achieve additional external interrupts.

Regards,

Scotty

IP: Logged

vanmierlo
Member
posted September 06, 2010 05:58 AM     Click Here to See the Profile for vanmierlo   Click Here to Email vanmierlo     Edit/Delete Message
If the signal from the sensor is not conditioned for a digital input I would highly recommend to use the comparator input for this.

IP: Logged

England90
New Member
posted November 22, 2010 09:28 AM     Click Here to See the Profile for England90   Click Here to Email England90     Edit/Delete Message
Thanks for sharing this information!

------------------
Vietnam travel-Vietnam holiday-Cambodia tours

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b