HCS12 uses memory mapped IO. That being said, the chip doesn't provice instructions that let you directly access the General Purpose Input/Output Pins.
HCS12 General Purpose Pin Control/Programming
-
03-07-2022 - |
Question
A HCS12 microcontroller I had to buy for a class I had recently taken has 40 pins on the back side of it. The class was merely about computer organization, and so unfortunately, we never had a chance to cover all the capabilities of the chip itself. Now that the class is over, I have been thinking about using the to familiarize myself with the assembly language. I haven't found any sources that cover pin control and was wondering if anyone could possibly provide me with a hands-on pin tutorial.
Note: I have already looked at the HCS12 reference manual, and there was absolutely nothing mentioned about pin control.
Solution
OTHER TIPS
a little Googling indicates the HCS12 uses memory mapped IO, so there are no special instructions for reading and writing the ports. there are some assembly language snippets here for example: http://hcs12text.com/part013a.html