May 26, 2015
09:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 26, 2015
09:26 PM
"Writes the value to the physical port (data output register), masking and shifting the bits appropriately."
Does this mean if I have a pin component on P0[0:2] and I call Pin_Write(0x3), P0[0] and P0[1] will be high and P0[2] wil be low?
3 Replies
May 27, 2015
02:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 27, 2015
02:49 AM
That is exactly what happens!
When you have a pins-component at P2[3..5] a Write(0x05) would set P2[3] and P2[5] and reset P2[4]. Before the port bits are set they are shifted accordingly.
Bob
May 27, 2015
04:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 27, 2015
04:37 AM
Useful ap note on GPIO -
http://www.cypress.com/?rID=93401 AN86439 - PSoC® 4 - Using GPIO Pins
Regards, Dana.
May 29, 2015
03:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 29, 2015
03:28 PM
Thanks! That clears it up