Manupulating pins in assembly
Anonymous
Not applicable
Dec 19, 2008
12:00 AM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Dec 19, 2008
12:00 AM
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.
Labels
Rate this article:
Contributors
-
This widget could not be displayed.Anonymous