Tomin Posted April 5, 2015 Report Share Posted April 5, 2015 On Arduino it is possible to read a whole port at once: http://www.arduino.cc/en/Reference/PortManipulationIs this possible with Zpuino running on the Papilio DUO fpga? I'd need to access DH. Quote Link to comment Share on other sites More sharing options...
Jack Gassett Posted April 5, 2015 Report Share Posted April 5, 2015 Hello, it definitely is possible, but I don't remember the syntax off the top of my head and am away from my dev machine at the moment. Maybe Alvie can post an example, or I will look it up monday morning. Jack. Quote Link to comment Share on other sites More sharing options...
alvieboy Posted April 7, 2015 Report Share Posted April 7, 2015 Yes, it is possible, but only as long as the sequence fits in 32-bits. outputRegisterForPin(pinNumber) will get you the register for that pin block, and it's 32-bits. So outputRegisterForPin(0) will return the register for the 0-31 pins, outputRegisterForPin(32) for pins 32-63, so on.register_t bank0 = outputRegisterForPin(0);// All outputs to ones.bank0 = 0xffffffff;// read all inputsunsigned values = bank0;Alvie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.