Read/Write on the MC68HC908MR16

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I was curious about the type or port access this chip has.
If you do and operation where you read , modify , write to the port
do you actually read the real port "register" output or do you read in
the "outputs" current state (the pins state) ?
I want to see if you need to make shadow registers of the outputs to
modify instead of being able to modify the registers directly.

Re: Read/Write on the MC68HC908MR16
When you read a pin (configured as an output by the DDRx register), you have
the real value of the pin, after the register PTx.
So, if you want modify the output value, you can read this port, make a mask
(OR or AND), and set this result in the PTx register.


message : 40a%a.202$
Quoted text here. Click to load it

Site Timeline