Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 6 months ago.
DigitalOut voltage not zero or 3.3 volts
I'm using an LPC1768. I find that often with DigitalOut on, for example, pins 5,6, or 7, the voltage at these pins do not always switch between 0 and 3.3 volts and that the intermediate level persists until the next change of state. In other words, this is not a transient phenomenon. What would cause that?
4 Answers
10 years, 6 months ago.
Could be related to switching of pinmode. Are you using that somewhere? Other possibility is damaged pindriver. However, most likely is two or more shorted output pins. Logic level is 0 when both pins are 0, the level is 1 when both are 1. The level will be somewhere in between when pins are at opposite levels. Check wiring and conductivity for shorts or wrong connections.
10 years, 6 months ago.
You didn't post any code, but it sounds to me like the pin has been configured as an input and it's floating.
10 years, 6 months ago.
I think what I'm seeing is the state of the pins before program execution begins. I had expected the voltage on the pins to be zero then but apparentl not. Many thanks for your replies.
7 years, 11 months ago.
I am currently facing the same problem in a NUCLEO-F446RE
Originally I had a digital DigitalOut connected to a small load, after a while of operation the output pin started drawing 1.75V when set to LOW and 3.3 when set to High. My conclusion was that I burned that output pin, so a changed the output pin to another pin and used a SN74AC04 Hex buffer as a buffer between the MCU and the load. It worked OK for a while, and after a few weeks of testing the output pin started showing the same behavior. The buffer drained below 1mA from the MCU, so i imagine I did not over-stressed the output pin.
Any ideas? I am not using any external pull-up or -down resistors beteween outputs and loads.
It is possible that it was an inductive or capacitive load and burnt out the pin through transient behavior i.e. voltage spikes and/or current spikes. If you were driving a mosfet and didn't put a current limiter on the gate you would be drawing a very high current into the mosfet (because the gate has a capacitance) and would wear out either the micro or fet over time, would recommend i.e. 10-100R on the gate to prevent this phenomenon if this is the case. Similar situation with inductive loads if you are ie driving a small motor, it's much better to drive loads with an external transistor as it will offer the chip a bit more protection & dont forget flyback diodes
posted by 24 Aug 2016