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
Interrupts on Port H
Started by ●August 10, 2011
Reply by ●August 10, 20112011-08-10
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: t...@almy.us
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
>
>
Tom Almy
Tualatin, Oregon USA
Internet: t...@almy.us
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
>
>
Reply by ●August 10, 20112011-08-10
well I think its one interrupt but I need to use two dip switches to display the
messages.
--- In 6..., Tom Almy 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
> >
> >
> >
> >
> >
> >
--- In 6..., Tom Almy 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
> >
> >
> >
> >
> >
> >
Reply by ●August 11, 20112011-08-11
how does your port H initialization and port H ISR look like?
Edward
----- Original Message -----
From: "dedison07"
To: <6...>
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
>
>
Edward
----- Original Message -----
From: "dedison07"
To: <6...>
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
>
>
Reply by ●August 11, 20112011-08-11
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: t...@almy.us
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 6..., Tom Almy 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
>>>
>>>
>>>
>>>
>>>
>>>
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: t...@almy.us
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 6..., Tom Almy 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
>>>
>>>
>>>
>>>
>>>
>>>