Shop OBEX P1 Docs P2 Docs Learn Events
Dira question — Parallax Forums

Dira question

T ChapT Chap Posts: 4,198
edited 2007-01-30 06:10 in Propeller 1
dira[noparse][[/noparse]0..7] := 1

Can you not set a set of outs with this method? It isn't working so I guess not.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-01-30 06:06
    dira[noparse][[/noparse]0..7] is an 8 bit value. You're setting this to 1 which is %00000001. If you want to set these pins all to outputs, you need to set it to %11111111 which is the same as $FF or 255. You could also use the notation "dira[noparse][[/noparse]0..7]~~" which sets all the bits to ones.
  • T ChapT Chap Posts: 4,198
    edited 2007-01-30 06:10
    Great Thanks Mike! If the range is say dira[noparse][[/noparse]8-15] := 1 do you have to write the entire string from the first bit or start at bit 9 like

    dira[noparse][[/noparse]8-15] := %11111111 ' 8 - 15 to outs

    Post Edited (originator) : 1/30/2007 6:19:11 AM GMT
Sign In or Register to comment.