Shop OBEX P1 Docs P2 Docs Learn Events
Initializing port direction — Parallax Forums

Initializing port direction

Don MDon M Posts: 1,653
edited 2013-02-13 05:59 in Propeller 1
I am curious if there is another way of doing this.

In my code I set the direction of a pin (RST) to output and then set it high as the default state:
PUB Demo

  ser.Start(RX, TX, 0, 9_600)                        ' communicate with 4D display
  term.start(31, 30, %0000, 115_200)                    ' start terminal using PST
  dira[RST]~~                                           ' Set RST pin as output
  outa[RST]~~ 

but then I get this small glitch when the Prop powers up:
powerup dira.png


which the display interprets as a reset. In my code I have a method for reseting:
PUB Reset

  outa[RST]~
  pause(2)
  outa[RST]~~

If I comment out the "dira" and "outa" command at the beginning of my code then the reset method does not work.

Is there another way to make this work?

Thanks.
520 x 269 - 4K

Comments

Sign In or Register to comment.