I'm having a problem having two interrupts on Port H, I want to use two dip switches to show two different messages on my LED but I don't know how to configure it two where both messages show I only can get one message on both switches. Please help
|
You can only have one interrupt routine for port H. It must check the flag bits one at a time and print the appropriate message for each bit.
Tom Almy Tualatin, Oregon USA Internet: [hidden email] Website: almy.us On Aug 10, 2011, at 5:10 AM, dedison07 wrote: > I'm having a problem having two interrupts on Port H, I want to use two dip switches to show two different messages on my LED but I don't know how to configure it two where both messages show I only can get one message on both switches. Please help > > > > ------------------------------------ > > Yahoo! Groups Links > > > > |
well I think its one interrupt but I need to use two dip switches to display the messages.
--- In [hidden email], Tom Almy <maillists_for_tom@...> wrote: > > You can only have one interrupt routine for port H. It must check the flag bits one at a time and print the appropriate message for each bit. > > Tom Almy > Tualatin, Oregon USA > Internet: tom@... > Website: almy.us > > > > On Aug 10, 2011, at 5:10 AM, dedison07 wrote: > > > I'm having a problem having two interrupts on Port H, I want to use two dip switches to show two different messages on my LED but I don't know how to configure it two where both messages show I only can get one message on both switches. Please help > > > > > > > > ------------------------------------ > > > > Yahoo! Groups Links > > > > > > > > > |
In reply to this post by dedison07
how does your port H initialization and port H ISR look like?
Edward ----- Original Message ----- From: "dedison07" <[hidden email]> To: <[hidden email]> Sent: Wednesday, August 10, 2011 3:10 PM Subject: [68HC12] Interrupts on Port H > I'm having a problem having two interrupts on Port H, I want to use two > dip switches to show two different messages on my LED but I don't know how > to configure it two where both messages show I only can get one message on > both switches. Please help > > > > ------------------------------------ > > Yahoo! Groups Links > > > |
In reply to this post by dedison07
Logic of interrupt service routine needs to be along the lines:
1. If interrupt flag for pin connected to first switch is 0 (not set) then goto step 3. 2. put up message associated with first switch 3. If interrupt flag for pin connected to second switch is 0 (not set) then goto step 5. 4. put up message associated with second switch 5. clear interrupt flags and return from interrupt routine. Tom Almy Tualatin, Oregon USA Internet: [hidden email] Website: almy.us On Aug 10, 2011, at 6:33 AM, dedison07 wrote: > well I think its one interrupt but I need to use two dip switches to display the messages. > > --- In [hidden email], Tom Almy <maillists_for_tom@...> wrote: >> >> You can only have one interrupt routine for port H. It must check the flag bits one at a time and print the appropriate message for each bit. >> >> Tom Almy >> Tualatin, Oregon USA >> Internet: tom@... >> Website: almy.us >> >> >> >> On Aug 10, 2011, at 5:10 AM, dedison07 wrote: >> >>> I'm having a problem having two interrupts on Port H, I want to use two dip switches to show two different messages on my LED but I don't know how to configure it two where both messages show I only can get one message on both switches. Please help >>> >>> >>> >>> ------------------------------------ >>> >>> Yahoo! Groups Links >>> >>> >>> >>> >> > > > > > ------------------------------------ > > Yahoo! Groups Links > > > > |
Free forum by Nabble | Edit this page |