Go Down

Topic: ARDUINO MEGA NO CHANGE STATE DIGITAL PIN (Read 356 times) previous topic - next topic

ALEJANDRO31

Hello, I have a trouble with my arduino Mega, the output 9 (digital pin) hold the high level of the output and not change or toggle with blink when in the program I write the instruction digitalWrite LOW, the serial monitor read the pin with high level and when I connected this pin to ground without resistor,  change to zero, when I write the instruction analogWrite with value of 200, I read the frequency  30Khz by a short moment and then change to zero,  do they think that possible this pin is damage? or maybe is necessary reinstall the bootloader for fix this trouble, thanks

ieee488

Hello, I have a trouble with my arduino Mega, the output 9 (digital pin) hold the high level of the output and not change or toggle with blink when in the program I write the instruction digitalWrite LOW, the serial monitor read the pin with high level and when I connected this pin to ground without resistor,  change to zero, when I write the instruction analogWrite with value of 200, I read the frequency  30Khz by a short moment and then change to zero,  do they think that possible this pin is damage? or maybe is necessary reinstall the bootloader for fix this trouble, thanks
All sorts of wrongs in this.

Perhaps you should read a tutorial.




CrossRoads

Please post the code you are running, how are you using the serial monitor to read the pin? Use the code tags button, </> in the menu, to add it.
analogWrite will have a frequency of ~ 490 or 980 Hz, where are you getting 30 KHz from?

If you grounded the pin with no resistor while digitalWrite or analogWrite were trying to output a high level, then you more than likely damaged the pin.  Does the 2560 chip feel warm or hot to the touch?

If load and run the File:Examples:Basic:Blink program, does the L LED (the onboard LED) still blink?

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up