Shop OBEX P1 Docs P2 Docs Learn Events
Problem trying to use Smart Pin Sync Serial — Parallax Forums

Problem trying to use Smart Pin Sync Serial

I'm having a problem getting Smart Pin sync serial working. I'm using the Edge Module Breadboard. I'm not a hardware guy, so I'm not sure if the problem is hardware or software. See attached docs for details. Any feedback would be appreciated.

Comments

  • It appears that the P2 pin for the DATA input is not running as a smart pin, but is somehow being set to a LOW and dragging down the incoming signal. If you include a series resistor (say 4.7k) between the P2 pin and the 74AHCT125 output, does the output on the 74AHCT125 not get pulled down? I assume that you have the OE control pins on the 74AHCT125 enabled for outputting.

    I'm still learning smart pins myself (as most of us are), in other PASM routines that have more than one smart pin being used/setup, I noticed that you need to enable the smart pins (plural) using something like the following CON setting:

    Try adding the following CON variable:

    rx_pins = 2<<6 + rxin

    and then change the following lines in your code to use the new CON variable:

    dirl #rxin ------> dirl #rx_pins
    dirh #rxin -----> dirh #rx_pins

    The above may or may not make any difference, but it is worth a shot.

  • evanhevanh Posts: 15,910
    edited 2021-02-10 11:55

    Setting a smartpin mode overrides the DIR control of the output. Bit 6 of the mode word sets the output enable. This is because, when using a smartpin, DIR gets used to enable/disable the smartpin. The mode word below should do the job right.

    sync_rx_mode    long  %0000_0001_000_0000000000000_00_11101_0
    

    Also, try replacing RQPIN with RDPIN. RQPIN won't clear the smartpin's completed flag.

  • Changing bit 6 of the mode word from a 1 to a 0 got it working. Thanks so much for the help and quick response.

Sign In or Register to comment.