Shop OBEX P1 Docs P2 Docs Learn Events
Accessory Set: Control Board - Page 2 — Parallax Forums

Accessory Set: Control Board

2»

Comments

  • hi all,

    to enable pull-ups I am using
    wrpin(RE_A, P_HIGH_15K)
    pinhigh(RE_A)
    
    and this works OK, but under some conditions I am noticing some really odd behaviour,
    almost as though the pullups aren't asserted unless I add some tactical delays in the code,

    is anyone aware of any special timing constraints to take into account?
    or (more likely) have I got the code wrong?

    (I am using the Propeller Tool 2.2.0.0 alpha, Spin2, and a P2 Eval board)

    cheers,
  • JonnyMacJonnyMac Posts: 9,104
    edited 2020-07-09 07:08
    According to the schematic, those are active-high inputs, so you need to use pull-downs. I wrote this object:

    -- https://github.com/parallaxinc/propeller/tree/master/libraries/community/p2/All/jm_p2es_control

    ...which seems to work fine.
  • thx Jon, I probably should have started another topic for this as I'm not using the accessory control board, I'm just trying to use internal pull-ups (for connection to a rotary encoder).

    I'm wondering if there are any timing considerations to be aware of when setting pull-ups, or if I've got the code wrong. I think the pull-up code is OK since I am reliably detecting movement in both directions at the encoder ... but on occasion, when I alter unrelated code, it seems to affect the behaviour of these pins & placing a small delay after the
    pinhigh()
    
    restores correct behaviour.

    cheers
Sign In or Register to comment.