You are here

Controlling a GPIO in Assembly | Cypress Semiconductor

Support & Community

Controlling a GPIO in Assembly

Last Updated: March 27, 2011

I understand how to put a byte out to a register. How do I control P1(0) without effecting other pins ?


You will have to mask the other bits of the register. You can do so in assembly by the following instructions:

To set bit 0: or reg[PRT1DR],1

To clear bit 0: and reg[PRT1DR],~1

Knowledge Base Tags: 

Provide feedback on this article

Browse KB By Product

Browse KB by Type