Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
Configuration of a Port I/O pin for EZ-USB FX device CY7C646xx
Question: How can I configure GPIO as Port I/O functionality for EZ-USB FX device CY7C646xx?
In order to configure any Port pin for I/O functionality you need to do the following:
(1) Set the PORTxCFG (where x is the desired port) to its I/O function. For example to select Port A for I/O: PORTACFG =0x00;
(2) Set the Output Enable register, OEx, (where x is the desired port), set to 0 for input and set to 1 for output
(3) If set for input, use the PINSx (where x is the desired port) register for reading the contents of the I/O Port pin. If set for Output write to the OUTx (where x is the desired port) register. Please see the EZ-USB FX TRM, chapter 4 for further information.