im getting 1.8v on a pin when its set to low

im connecting a load between 3.3v and pin 12. i have set pin 12 as an out put and just put in the code digitalWrite(12, LOW);
but im measuring 1.8v ?? am i doing something wrong?? help

Which board? Which load?

a mega and dont know what you mean by load

patricklou15:
a mega and dont know what you mean by load

Load refers to a circuit that draws current from Pin-12. it could be a R or R-L or R-L-C or R-LED circuit; where, R stands for resistor, L for inductor/coil, C for capacitor, and LED for Light Emitting Diode.

Have you included the following code in your sketch to set the direction of DPin-12 as output?

pinMode(12, OUTPUT);

I would suggest to connect R-LED (2.2k + LED) circuit between Pin-12 and GND and execute the following codes:

void setup()
{
   pinMode(12, OUTPUT);    //DPin-12 will work as output pin
   digitalWrite(12, HIGH);    //LED is ON
   delay(2000);                  //LED remains ON for 2-sec
   digitalWrite(12, LOW);    //LED is OFF
}

void loop()
{

}

If LED does not go OFF, then you have the problem with Pin-12 of MEGA which will require investigation.

patricklou15:
am i doing something wrong?? help

You may already have destroyed your Pin 12.

Arduino I/O pins should not be expected to source or sink more than about 20mA. 40mA is the absolute maximum.

...R

patricklou15:
a mega and dont know what you mean by load

patricklou15:
im connecting a load between 3.3v and pin 12. i have set pin 12 as an out put and just put in the code digitalWrite(12, LOW);
but im measuring 1.8v ?? am i doing something wrong?? help

:smiley:

You clearly need to be a bit more specific. The other thing to keep in mind is that the 3.3v pin of the Mega is not really capable of sinking current from voltages higher than that. Ok you've set the pin 'LOW' but don't set it 'HIGH' And what is the resistance of the load ?

Sounds like an LED with no curretn limiting resistor.

a7

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.