Shop OBEX P1 Docs P2 Docs Learn Events
output a nible — Parallax Forums

output a nible

ArchiverArchiver Posts: 46,084
edited 2003-04-08 02:24 in General Discussion
How can I output a nible to a port.


result var nib
result = %1010
'I like to see this pattern on I/O pins P8 through P11
'P8 = 1, P9 = 0, P10 = 1 and P11 = 0
I used this statement:
result2 var OUTC
'
result2 = result


It didn't work
Thanks
Greg

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-04-08 02:24
    You need to make those pins outputs. Add this to your program:

    DirC = %1111

    ... and it will work. The BASIC Stamp defaults pins to inputs for safety
    reasons. Your program must specifically set them as outputs when needed.

    -- Jon Williams
    -- Parallax


    In a message dated 4/7/2003 7:03:17 PM Central Standard Time,
    gvgregor@y... writes:

    > How can I output a nible to a port.
    >
    >
    > result var nib
    > result = %1010
    > 'I like to see this pattern on I/O pins P8 through P11
    > 'P8 = 1, P9 = 0, P10 = 1 and P11 = 0
    > I used this statement:
    > result2 var OUTC
    > '
    > result2 = result
    >
    >
    > It didn't work
    > Thanks
    > Greg



    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.