Hi TJF,
i'm trying to use "simultaneos GPIO" tips for reading, writing and redirectory pins on GPIO2 subsystem, following the suggestione in your Wiki but can't get it work as expected and didn't find any example about OE register usage.
I tried to get some help from chapter 25, but with no luck.. so you could give us some more info.
First of all, for having some result, i had to use Cleardataout inverted from Setdataout, so i wrote:
Code: Select all
Io->Gpio->Conf(2)->SETDATAOUT AND= mask
Io->Gpio->Conf(2)->CLEARDATAOUT OR= NOT mask
instead of your:
Code: Select all
Io->Gpio->Conf(2)->SETDATAOUT OR= mask
Io->Gpio->Conf(2)->CLEARDATAOUT AND= NOT mask
Second question: OE seems work when GPIO set as input and after changed by OE register, but doesn't work for me if GPIO first set as output.
So, in general, how i should define the GPIO Pin before change direction with OE? how can i set the pullup-pullout options?
Last stupid question, is why you suggest to use Mix register for reading multiple pins and not the DATAIN register? since i get an "inverted" reading from the IDE port i connected to my cape in my project, i wonder if i missed somethings...
Thank you in advance if you can give some advice!