Arduino pin goin LOW after booting

i had posted this on the wrong thread earlier so forgive me if this turns out to be a duplicate.

I just got my SMD board fabricated to test it. i solder all the components using a hot plate.
Earlier all worked properly on a through hole with DIP package Atmega but when my Arduino on the standalone SMD board is booted PIN 13 goes LOW or at least that is how i understand (i maybe wrong)

Normally the pin called buttonPin on PIN 13 of the Atmega328 TQFP32 enters a menu once held down for 2 seconds. So i guess this is something that is happening once it is booted I checked the continuity and there is no short to GND.

Would somebody please help me troubleshoot this. I probed Pin13 and i just see a 1KHz frequency from the buzzer interfering but would that be a problem ? is it because the buzzer PIN 11 is close to pin 13 ? I uploaded another sketch and that had no problem with buzzer and ButtonPin as is.


The most simple test to exclude software errors: upload a sketch that does nothing, keeping pin 13 high or in input pullup mode.

A probe with missing or wrong Gnd connection or an input pin can show any voltage level.

Also make sure that you translated the pin numbers correctly, between SMD and DIL cases. The pin numbers mapping to the PCB headers do not correspond to the chip pin numbers.

duplicate removed

anishkgt:
I probed Pin13 and i just see a 1KHz frequency from the buzzer interfering but would that be a problem ?

As far as I know, all pins on the ATmega are set to INPUT upon boot (including pin 13 - which in Arduinos will be connected to the a built-in LED), so unless you do something in your code to change that state it will always be INPUT.

So indeed you could measure any voltage there, and then a nearby 1 kHz signal can very well show there, too.

The most simple test to exclude software errors: upload a sketch that does nothing, keeping pin 13 high or in input pullup mode.

const int buttonPin  = 9;  // Weld button
void setup() {
  pinMode(buttonPin, INPUT_PULLUP);
}
void loop() {
  // put your main code here, to run repeatedly:

}

Just did that and probed the pin13, reads 4.09v

As far as I know, all pins on the ATmega are set to INPUT upon boot (including pin 13 - which in Arduinos will be connected to the a built-in LED),

But is the chip pin 13 the Arduino board pin 13 ?

pin 13 is on TQFP32 which is DP 9 on the arduino.

Latter burned the boot-loader again and uploaded the code. Seems to work after that which lead to another problem.

Uploading the sketch again gives this error during the final stage of Reading but the code is uploaded and works.

Reading | ###avrdude: loadaddr(): (b) protocol error, expect=0x14, resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avr_read(): error reading address 0x0000
read operation not supported for memory “flash”
avrdude: failed to read all of flash memory, rc=-2
avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

the selected serial port
does not exist or your board is not connected

anishkgt:
Just did that and probed the pin13, reads 4.09v

I suspect just about every one is confused.

When you say 'pin13' do you mean pin13 on the ATmega itself or what the Arduino IDE knows as pin13 ?

When you say 'pin13' do you mean pin13 on the ATmega itself or what the Arduino IDE knows as pin13 ?

Just cleared that in the previous post.