cancel
Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

Anonymous
Not applicable

I need some GPIO in my design.

0 Likes
Reply
1 Reply
Anonymous
Not applicable

PA7 to PA0 are all available as GPIO. Look at the code and the hardware design  to be sure they are not being used for something else, pick one that is free.

   

Use OEA = 0xXX;  where hex value XX sets the pins to 0 for inputs and 1 for outputs as required for the 8 ports
Then use a bit mask to toggle the port you want.

   

Examples:

   

   IOA  |= 0x01;        // Sets port PA0 high without changing other PAx ports        
   IOA &= 0x04;      // Sets port PA3 low without chaging other PAx ports

0 Likes
Reply