Shop OBEX P1 Docs P2 Docs Learn Events
Reading ports?? — Parallax Forums

Reading ports??

ArynockArynock Posts: 2
edited 2008-09-05 05:35 in BASIC Stamp
Okay,· so i'm trying to read a 8bit databus with my basic stamp....

the only thing is... how can i read pins8-15 and store it into a variable in binary?

i know how to read pins individually, but i want to be able to read a whole port....

any help would be greatly appreciated..

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-05 05:35
    In the section of the manual on memory allocation, there's a discussion of the I/O registers OUTS, INS, DIRS which are 16 bit variables that represent all 16 I/O pins as outputs, inputs, and direction settings. These registers are all divided into bytes, nibbles, and individual bits and all of these have names. Input bits 8-15 are also named INH and that can be stored into any variable as an 8-bit value.
Sign In or Register to comment.