Read all pins in 1 port simultaneously
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-11 6:27 AM
Posted on April 11, 2014 at 15:27
I wonder how to read all port simultaneously such as GPIOA0 up to GPIOA7
or the equivalent of arduino codes DDRA = B00000000; // sets Arduino Mega Digital pins 22(PORTA0) to 29(PORTA7) as inputs allBus = PINA; //read all PIN bit state #ports #pins
This discussion is locked. Please start a new topic to ask your question.
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-11 6:32 AM
Posted on April 11, 2014 at 15:32
GPIOA->MODER = 0;
allbus = GPIOA->IDR; JWOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-11 6:36 AM
Posted on April 11, 2014 at 15:36
Thanks I will try the codes right away
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-11 12:30 PM
Posted on April 11, 2014 at 21:30
I think you are confusing pins with ports?
As described, you can read all the pins of a port simultaneously; but you can't read multiple ports simultaneously.
A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
A complex system designed from scratch never works and cannot be patched up to make it work.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-11 7:27 PM
Posted on April 12, 2014 at 04:27
Yes, you are correct I mean all pins in one port, problem solved.
