??? 09/02/08 05:58 Read: times |
#157895 - You need to make sure,.... Responding to: ???'s previous message |
Alex:
You need to make real real sure that the opamp output connected into the P1.2 pin is seeing an input at the MCU. Make completely certain that you have the P1.2 setup as an input pin. For this type of MCU the port pins are quasi-bidirectional and to make a pin an input you have to set its output port latch bit equal to a "1". So this means you have to make sure to set bit 2 in PORT1 to a "1". If you have this bit set low then the P1.2 is an output and pulling to a low level. This will create a tug-of-war contest with the output of the opamp that wants to go positive, as you have indicated, toward the positive supply. In this contest the resulting voltage on the port pin normally ends up at about 1.1 to 1.6 volts and so since you have stated that you see 1.2V then that is a strong indicator that the MCU pin is currently being configured as an output and pulling low!! Now to elaborate a bit more on what Kai wrote. The LM358 has an output circuit structure that does not permit the output to go much higher than about 1.5 volts below the V++ rail of the opamp; particularly if you ask the output to source any current at all. So if you have the opamp powered from 5 volts you will likely be able to see the operating range of the opamp output be up to about 3.5 maybe 3.7 volts or so. It is possible that if you were measuring the open circuit output voltage of the op-amp with a very high impedance meter or scope probe that maybe you would see the output go a bit higher than the 3.7 volts....but not likely all the way to +5V. I can think of several ways that may make it possible to have a 5V output from the opamp...a) the opamp V++ is at 6.5V...b) there is a pullup resistor to +5V at the output of the opamp in your circuit.....or...c) The opamp output is damaged and virtually shorted to the V++ rail of the opamp. You may actually want to try another opamp. It is possible that if you had the MCU P1.2 set as an output at a low level and opamp output wants to be high at V++ - 1.5 volts or so then the resulting tug-of-war may have burned your opamp or your MCU. Michael Karas |
Topic | Author | Date |
LM358 and 2051 | 01/01/70 00:00 | |
What does "doesn't work" mean? | 01/01/70 00:00 | |
Voltage level | 01/01/70 00:00 | |
Hardly... | 01/01/70 00:00 | |
More details. | 01/01/70 00:00 | |
You need to make sure,.... | 01/01/70 00:00 | |
Have u checked Pin voltage | 01/01/70 00:00 | |
Check list | 01/01/70 00:00 | |
Oops... | 01/01/70 00:00 | |
Amazing.... | 01/01/70 00:00 | |
There You Go![]() | 01/01/70 00:00 |