Read/Write on the MC68HC908MR16

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. Tony

Reply to
Anthony Marchini
Loading thread data ...

Hi, 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. Yvan

****************************** YBDesign
formatting link

Anthony Marchini a écrit dans le message : 40a%a.202$

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.