Shop OBEX P1 Docs P2 Docs Learn Events
Selectable events — Parallax Forums

Selectable events

In the propeller 2 documentation there is tabel with these selectable events:
%000_00_00AA = this cog reads LUT address %1111111AA
%000_00_01AA = this cog writes LUT address %1111111AA
%000_00_10AA = odd/even companion cog reads LUT address %1111111AA
%000_00_11AA = odd/even companion cog writes LUT address %1111111AA
%000_01_LLLL = hub lock %LLLL rises
%000_10_LLLL = hub lock %LLLL falls
%000_11_LLLL = hub lock %LLLL changes
%001_PPPPPP = INA/INB bit of pin %PPPPPP rises
%010_PPPPPP = INA/INB bit of pin %PPPPPP falls
%011_PPPPPP = INA/INB bit of pin %PPPPPP changes
%10x_PPPPPP = INA/INB bit of pin %PPPPPP is low
%11x_PPPPPP = INA/INB bit of pin %PPPPPP is high
The last two do not make sense to me. These are not events. A Pin is high or low. If it changes I have a event.
What am I missing?

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2018-01-12 19:17
    Events are triggered repeatedly during given state.

  • cgraceycgracey Posts: 14,152
    edited 2018-01-12 21:10
    Yes, this was put in to provide transitionless sensitivity to high INA/INB states from smart pins, which indicate that a smart pin has/needs data.

    The problem was that sometimes when you'd be configuring an interrupt for a smart pin INA/INB event, the INA/INB bit would already be high and would not go low again until you acknowledged the smart pin. So, there needed to be an interrupt source that would stay 'on' until the smart pin was acknowledged, which would happen in the interrupt service routine.
  • Ah, there is the event/interrupt for smart pins (e.g. serial byte received) I was searching for.
    So these events are triggered, when INA/INB states are newly set (regardless of the previous state) in smart pin mode.
    I think I understand now.
    Thank you.

  • cgraceycgracey Posts: 14,152
    edited 2018-01-13 19:59
    Yes, those smart pin events are ON until the smart pin is acknowledged. So, those static-pin-state events are really meant to drive interrupts from smart pins. For polling smart pins in software, you would just look at the INA/INB bit.
  • evanhevanh Posts: 15,915
    Cool, that could also be used for level based interrupt controllers. ie: shared or extendable interrupts.

Sign In or Register to comment.