chipKIT® Development Platform

Inspired by Arduino™

Inverted digital ports?

Created Mon, 22 Apr 2013 15:31:14 +0000 by tsalzmann


Mon, 22 Apr 2013 15:31:14 +0000

I have a max32 and I'm having problems with the output voltage of the port number 51. I initialize it how I always do but when I set HIGH using digitalWrite, the output voltage is only 0.4V and when I set LOW the output voltage is 2.9V... :evil:

How can I fix it?? Is it my code or is the port 51 special or something like this?


Mon, 22 Apr 2013 15:51:22 +0000

I tried this code: pinMode(51, OUTPUT);
digitalWrite(51, LOW); Output is low ( near zero) on pin51

Tried this: pinMode(51, OUTPUT);
digitalWrite(51, HIGH); Output is HIGH ( near 3.3 ) on pin51

Do you have Tools -> Board set to Max32?



Mon, 22 Apr 2013 16:39:51 +0000


Actually I use pin 51 as one of the outputs to control a motor. For this I need 3 pins. One is the PWM (I'm using the 5) and the other two are the IN1 and IN2 (53 and 51). Everything is working with the pin 53 but not with the 51... I'm using the MC33926 motor controller...

and yes, the board selected is on ChipKIT MAX32


Mon, 22 Apr 2013 17:08:08 +0000

Are you using SPI as it uses pins 51,52,53


Mon, 22 Apr 2013 17:20:33 +0000

No... If yes, how can I disable it? How should the jumpers be organized?