Is it stable to change I/O direction on microcontroller repeatedly?
Posted
by SS
on Stack Overflow
See other posts from Stack Overflow
or by SS
Published on 2010-04-20T17:03:01Z
Indexed on
2010/05/23
0:00 UTC
Read the original article
Hit count: 176
microcontroller
I'm new to microcontroller programming and I have interfaced my microcontroller board to another device that provides a status based on the command send to it but, this status is provided on the same I/O pin that is used to provide data. So basically, I have an 8-bit data line that is used as an output from the microcontroller, but for certain commands I get a status back on one of the data lines if I choose to read it. So I would be required to change the direction of this one line to read the status thus converting this line as an ouput to an input and then back to an output. Is this acceptable programming or will this changing of the I/O pin this frequently cause instability?
Thanks.
© Stack Overflow or respective owner