Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why, for HTG21xx Dot Matrix LCD type MCU, an input could be unexpectedly changed as an output after executing SET or CLR instructions?

0
Posted

Why, for HTG21xx Dot Matrix LCD type MCU, an input could be unexpectedly changed as an output after executing SET or CLR instructions?

0

Answer or CLR bit manipulation instructions are employed for output control. The SET and CLR bit manipulation instructions employ Read-Modify-Write operations, when used on I/O port, it will first read the entire port execute the defined bit operations and then write to I/O port. If the input line happens to be low externally on the line during Read phase, this input line will therefore to be read as 0 and write back to low and function as an output line. To avoid this situation, users are recommended to operate on the I/O Port RAM Buffer and then write the Buffer contents to I/O port.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.