Shop OBEX P1 Docs P2 Docs Learn Events
Waitpeq & Waitpne — Parallax Forums

Waitpeq & Waitpne

bambinobambino Posts: 789
edited 2007-04-09 15:04 in Propeller 1
I'll test it out later this evening, but maybe somebody knows already!
Say·I have a counter, in NCO mode, working as a clock source for an SPI engine.
If I set the dira register, for the clk pin to an input will the waitpeq & waitpne commands still work on the clock line even though its tri-stating?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-09 14:58
    The INA register always provides the actual state of the I/O pin regardless of the setting of the DIRA register, so the WAITPNE and WAITPEQ instructions will work on the actual I/O pin state. If you set the DIRA register to input mode, the counter cannot output to the I/O pin. You have to have the I/O pin direction set to output.
  • bambinobambino Posts: 789
    edited 2007-04-09 15:04
    Thanks Mike,

    Time is short in the evenings and this gives me time to go a different way with my counter than spending the night on a dead end road!
Sign In or Register to comment.