Home > other >  STC89C51 light a little light bulb is the input or output low level
STC89C51 light a little light bulb is the input or output low level

Time:09-26

On single-chip computer input and output are still a little don't understand, there are a great god specifically

CodePudding user response:

IO mouth is a two-way street, then the output, also can input, check the documentation to know, see to the problem of how to use.

CodePudding user response:

refer to the original poster qq_38441951 response:
about MCU input and output are still a little don't understand, there is a great god specifically

If you want to control the light bulb, then the output, you put your "command" output to the outside
If you want to know the current state bulb, which is input, will be outside the state of the "input" to the single chip microcomputer

CodePudding user response:

This you are to try to know yourself, output to the LED light, input reads the LED state,

CodePudding user response:

=be assignment before, such as P0 ^ 1=1; Is the high potential assigned to 01 mouth! A=P0 ^ 1; Pay a is P0 ^ 1 value

CodePudding user response:

What is light level depends on how to design the circuit is concerned.

CodePudding user response:

The output light small bulb do, see you on the other side of the small bulb grounding or VCC, if the grounding the port output low level MCU, conversely output high level

CodePudding user response:

Should be output is low, it is best not to output high, because the output of the microcontroller IO ability is limited, the light bulb at the other end to connect power, had better use triode

CodePudding user response:

Is the output low level

CodePudding user response:

Yang connection low level light

CodePudding user response:

MCU IO is two-way mouth can be set,
  • Related