Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Freezing when Launching — Parallax Forums

Propeller Freezing when Launching

SRLMSRLM Posts: 5,045
edited 2008-11-18 05:31 in Propeller 1
Hello, I'm working on a test harness to test a BS2 shiftin equivalent function. It uses most of the code from those functions in the BS2 for Propeller Library. Anyway, my problem is that it seems to freeze on the line
out.SHIFTOUT(value, CLOCK_IN, DATA_OUT)

·I scoped it when I first started trying to debug, and all that happened was the clock line went low and the data line went low. I am using the following schematic:
ps2.JPG
I slightly modified the above schematic by adding some current limiting resistors to the I/O pins. The pin count starts at P0 for the top, and works down to P3

·Now, however, nothing seems to happen to the data line and the IO lines. When I comment out the line mentioned above, the program works perfectly. It reads in the data on the line, and outputs a clock signal. The data is all 1s though, since there is nothing outputting information. Any suggestions?

Post Edited (SRLM) : 11/18/2008 4:13:46 AM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-18 04:30
    Your SHIFTOUT routine expects to see an external clock and uses WAITPNE / WAITPEQ to do so. These will wait forever for the desired state and probably are doing just that.
  • SRLMSRLM Posts: 5,045
    edited 2008-11-18 05:31
    But isn't that happening in another cog?

    I expected:

    Launch the SHIFTOUT in another cog
    go to the SHIFTIN
    The SHIFTIN provides the clock

    I go home happy...

    It sounds like when I put in out.SHIFTOUT(...) that it does everything in the same cog that "launched" it.
Sign In or Register to comment.