Shop OBEX P1 Docs P2 Docs Learn Events
Do MOVI, MOVS, MOVD work on DIRA/OUTA? — Parallax Forums

Do MOVI, MOVS, MOVD work on DIRA/OUTA?

Bill HenningBill Henning Posts: 6,445
edited 2009-11-09 06:56 in Propeller 1
Orthogonality would say that they should work...

If they do work, they would be a great alternative for some selective I/O!

I'd try it, but I am hip deep in the PropellerBasic code generator at the moment.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-09 01:51
    MOVI, MOVS, and MOVD should work fine on DIRA and OUTA (as destinations). The problem you run into is putting read-only register addresses in the destination field (like PAR, CNT, and INA).
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-11-09 01:56
    Thanks Mike,

    I was hoping that was the case! It will allow me (later) to make the code for my XMM much more readable, using MOVI to control latching the page address, and setting the read & write modes.
    Mike Green said...
    MOVI, MOVS, and MOVD should work fine on DIRA and OUTA (as destinations). The problem you run into is putting read-only register addresses in the destination field (like PAR, CNT, and INA).
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • David BDavid B Posts: 592
    edited 2009-11-09 02:19
    I had my prof dev board out on the desk, so I ran a test and used both movs and movd on both dira and outa to turn on and off a couple of the on-board LEDs, and they work.

    movs dira, #$F
    movs outa, #$F

    movd dira, #3
    movd outa, #3

    movd (and I assume movi also) does both a shift and place of the values, which could be useful for placing a byte-sized group of data values onto the IO pins.
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-11-09 02:35
    Thanks! I'd have tested but I am hip deep in writing C code (PropellerBasic)
    David B said...
    I had my prof dev board out on the desk, so I ran a test and used both movs and movd on both dira and outa to turn on and off a couple of the on-board LEDs, and they work.

    movs dira, #$F
    movs outa, #$F

    movd dira, #3
    movd outa, #3

    movd (and I assume movi also) does both a shift and place of the values, which could be useful for placing a byte-sized group of data values onto the IO pins.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-09 06:56
    Yep ... that's what I do in my LCD driver. Using port bits 0 to 7 and write data directly to outa, which is easier than masking - which is needed if you don't want to affect control-signals as WR or CS. But please remember, it's not byte size, it's 9 bit that you write. So, none of your control-signals should be attached to port bit 8.
Sign In or Register to comment.