Anonymous
Not applicable
Nov 11, 2010
12:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 11, 2010
12:04 AM
I need some GPIO in my design.
1 Reply
Anonymous
Not applicable
Dec 07, 2010
11:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 07, 2010
11:38 PM
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