Read/Write Multiple Pins in Assembly
Duane Degn
Posts: 10,588
in Propeller 2
I'm having a hard time figuring out how to interface with chips using multiple data pins.
On the Propeller 1 I could use outa to set multiple I/O pins high or low at the same time.
I could read multiple pins by using moving the ina register to my data variable.
How do I do this sort of think on the P2?
On the Propeller 1 I could use outa to set multiple I/O pins high or low at the same time.
or outa, data
I could read multiple pins by using moving the ina register to my data variable.
mov data, ina
How do I do this sort of think on the P2?
Comments
But there are also instructions to set or get a word, a byte or a nibble of porta for example.
Andy
I just realized I was attempting to find "ina" and "outa" in the P2 instruction list.
I should have realized "ina" and "out" aren't instructions they're registers.
Thanks for the help Andy.
Thanks Jon.
Making the switch to the P2 has been more challenging than I had thought it would be. I'm confident the 1 megabyte of RAM, double the I/O pins and much faster speed will make the transition worthwhile but brain periodically turns to jelly as I attempt to understand the P2.
There was an FPGA variant with 1MB IIRC, but don't expect to see a P2 variant with 1MB.
Way to spoil my delusion. I'll need to figure out why I was so sure there was 1 MB in the P2.
I've run out of RAM in several P1 projects. Hopefully 512KB will be enough for the P2 projects I have planned.
I think I must of read the 1 MB from a document which included the FPGA variant. The active P2 document includes this:
I didn't see the HubRAM mentioned in the P2 Evaluation Board page. The P2 Edge includes this info in the specifications section.
Thanks for setting me straight Ray.
It's a bit of effort, but totally worth it. If you can sit in on my Spin2 sessions, jump in and ask questions so that I or others can lend a hand.