- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo,
I have a very simple question. I'm using a CY8C29466 and I need to change the status of 3 output pins (defined as 'Strong' drive) and named SEL0, SEL1, SEL2. All of them belongs to the same port P2 specifically P2[1], P2[3], P2[5].
Is it possible to change the status of all pins at once using the base register of the port? If yes.. how?
Since these pins would 'comand' a mux device change them one by one would lead to some unpredictable status on the final demultiplexed output channels.
Best Regards,
Michele
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo,
I forgot to add that P2[0] and P2[4] ports are 'assigned' to other uses (uart in & out).
Best Regards,
Michele Santucci
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are trying to change the drive level for the pin answer is not in one
write instruction. Register write in TRM.
Same is true if you are trying to change the routing to the pin, you would do
it one pin at a time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo danadak,
I just have to change the state of the pin (it est set it low or high) I have not to change the drive mode neither to change the routing for that pin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See this, and consider using shadow register to handle partial port
pin updates -
http://www.cypress.com/?rID=2900 AN2094
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is quite right, Writing to trhe port data register writes simultanously to all 8 pins of the port. Care must be taken since you always write to all 8 pins which sometimes might not be what you desire. That is why Dana suggested to use a shadow register for. It is ment to avoid a read-modify write from a port which may lead to unpredictable or unexpected results.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content