Shop OBEX P1 Docs P2 Docs Learn Events
Why are these output pins changing state ? — Parallax Forums

Why are these output pins changing state ?

Hi

Here's some code and output from the scope.

I'd not expect either the top or bottom traces to change but they do.

The purple trace is connected to P2 (DataPin). I'd expect this to stay high.

The light blue trace is connected to P5. I'd expect this to stay low. In fact, P3 to P6 are all changing state.

I'm pretty sure it's a silly mistake but I can't see the wood for the trees.

Any ideas please ?

Thanks

Comments

  • ChrisGaddChrisGadd Posts: 310
    edited 2016-02-27 12:18
    Silly mistake: missing octothorpe # in the JMP display_frame instruction.
  • Yes it was thanks.

  • Heater.Heater. Posts: 21,230
    Ahrrrggh, that damn octothorp thing bites again.

  • Heater. wrote: »
    Ahrrrggh, that damn octothorp thing bites again.

    Not hard to believe. This processor is way different to the 6502 and Z80 but I will get there.

    Good community support here though thanks guys :-)

  • Heater.Heater. Posts: 21,230
    Yes the old 8 biters were very different.

    But that octothorpe thing is all about the assembly language syntax not the actual processor architecture.

    Which is not a complaint about Spin/PASM. Every programming languages has its gotchas. Like writing "if (x=y)..." in C instead of "if (x == y)..."

    One just has to know this stuff.
Sign In or Register to comment.