I am trying to use pull up configuration. What are the instructions to set, reset and toggle the bits? The existing instructions work well with pull down configuration.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am trying to use pull up configuration. What are the instructions to set, reset and toggle the bits? The existing instructions work well with pull down configuration.
Hello,
What does the "instructions" mean?
Most of I/O pins have registers for selecting the pull type, enabling/disabling the pull, and setting/clearing the DOUT register.
For example:
GIO module: gioPORTx->PSL, gioPORTx->PULDIS, gioPORTx->DOUT/DSET/DCLR
N2HET module: hetPORTx->PSL, hetPORTx->PULLDIS, hetPORTx->DOUT/DSET/DCLR
Actually I am turning ON and OFF the LEDs using gioSetDirection(hetPORT1 , ~ 0XFFFFFFF). It works with pull down configuration, but doesn't work with pull up configuration. So is there any other way to do so?
Hello,
gioSetDirection(hetPORT1 , ~ 0XFFFFFFF) is to configure all the NHET1 pins as INPUT.
If you want to toggle a pin to blinky a LED, the pin should be configured as OUTPUT, then you write 1 or 9 to DOUT register to toggle the pin.
1. gioSetDirection(hetPORT1, 0XFFFFFFF);
2. gioToggleBit(hetPORT1, bit);