Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

PORTB Interrupt Example

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
4,550
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 14, 2009

PORTB interrupts are used for instantaneous response for changes to Pins 4, 5, 6, 7 on PORTB. Further more, the interrupt will even wake the PIC from a Sleep instruction, so your device can be in low power mode (the PIC can draw as low as 0.1u Amps while in Sleep mode), and be instantly awoken when there is a change on PORTB.


One precaution to be aware of is not to forget to read the contents of PORTB within the ISR (Interrupt Service Routine). This is a hardware requirement to clear the mismatch condition that triggers the PORTB interrupt flag. The following program shows how to create a PORTB interrupt routine, that puts the PIC to Sleep after enabling the interrupt, and upon any pin change on PORTB 7:4, the PIC will wake up (thanks to the PORTB interrupt) and the change will be mirrored to PORTC.

See this tutorial for more information http://digital-diy.com/micro/site/swordfish/83-swordfish-code-snippet-interru...

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (2)

Sign In or Sign Up now to post a comment!
  • which software is this? isis professional?

  • difficult to understand

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more