Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Manupulating pins in assembly

Manupulating pins in assembly

Anonymous
Not applicable
Question: How to write assembly code to manipulate pins in assembly?  The pins would not go high or low in my assembly code. For example, I have "mov [PRT1DR], 0x03" but it won't do anything.

 

Answer:

 This is a common assembly mistake. The code above puts 0x03 into the RAM location whose address is that of PRT1DR, but not in the PRT1DR register. In order to correctly do this, the code should be changed to "mov reg[PRT1DR],0x03" for it to work.

0 Likes
253 Views
Contributors