Shop OBEX P1 Docs P2 Docs Learn Events
Registry Structure? — Parallax Forums

Registry Structure?

ElectronegativityElectronegativity Posts: 311
edited 2006-02-23 18:43 in Propeller 1
32 bit O/S and 32 I/O pins, hmm....

Is it possible to push data from a register at one bit per pin?

Like if you set an SX register to output and then moved a byte into that register.

I'm trying to figure out how easy it would be to effect parallel data transfer.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I wonder if this wire is hot...

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-23 18:15
    Sure: outa := myPinValue, where myPinValue is a Long.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-02-23 18:15
    Each processor has its own registers for the pins (there are 3, 1 for direction, one for reading, one for writing), so yes its is as simple as moving the contents of 1 internal register to the pin output register, and if the pins are configured as output, the value will be moved parallel-wise to the pins.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • ElectronegativityElectronegativity Posts: 311
    edited 2006-02-23 18:33
    Excellent.

    Just to clarify the terminology, I am used to a long being 2 bytes and 4 bytes being a double.

    I get the impresion you might be using long as 4 bytes here.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-02-23 18:43
    Yes, while there is some variation in certain circles, the common nomenclature is 1 byte=byte, 2 bytes=word, 4 bytes=long, 8 bytes=double long.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
Sign In or Register to comment.