Go Down

Topic: Help needed to restore original pin settings! (Read 1 time) previous topic - next topic

Yankee

Mar 10, 2011, 08:17 am Last Edit: Mar 10, 2011, 08:29 am by Yankee Reason: 1
I recently had need of a USB to serial converter and came across some instructions for using an Arduino as a converter here: http://students.sabanciuniv.edu/kehribar/?p=19. To accomplish this I reset the digital pins 0 and 1 on my Duemilanove with this small sketch:

void setup()
{
 pinMode(0,INPUT);
 pinMode(1,INPUT);
}
void loop()
{

}

Now when I try to load a sketch I get this error message:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


I'm assuming I need to change the pins back to their normal setting but don't know how to do this. Any ideas?

Coding Badly


Graynomad

Quote
I'm assuming I need to change the pins back to their normal setting

You shouldn't have to, when the programming starts the chip is reset and all pins are set to inputs regardless of what your program does.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Yankee

No, Coding, I disconnected everything with the same result.
Rob- That's what I was thinking.

Coding Badly

The bootloader blinks the on-board LED.  When you try to upload, does the LED blink?

What did you have connected to pins 0 & 1 when you were using the Arduino as a serial converter?

Yankee

I had a motor control chip (PicStep by J.R. Kerr) connected on a breadboard for testing purposes.
When I try to upload a sketch the LED blinks but only very briefly. I did some further testing just now to see if I could get a response through the serial monitor by looping TX back to RX and got nothing. Now I'm thinking I've somehow blown the Arduino or at least the FTDI chip. :(
I'm going to get a new board this afternoon and swap processors to determine if I also ruined the 328 chip.

johnwasser

If the auto-reset isn't working you should try a manual reset.

1) Hold down the Reset button on the Arduino
2) Click on the upload button in the IDE
3) Watch for the "Binary sketch size:" message in the IDE window and when it appears:
4) Release the reset button
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Yankee

Thanks John. I tried your suggestion but got the same error message.

mrtaylor

Check to see if you got the correct board/port selected.  If that does not work, reburn the bootloader.

Coding Badly

Quote
I had a motor control chip (PicStep by J.R. Kerr) connected on a breadboard for testing purposes.


Did that work?  Were you able to interact with the PIC-STEP?

Yankee

No. I was unsuccessful with the PicStep. I did do the loop-back test and confirmed at that time the serial port was working. Now it does not work.
I did not explain what happened in between however. I used the Arduino as the logic power supply to a breadboarded H-bridge using 12V for the motor. A misconnected wire allowed 12V to briefly be connected to the 5v rail and I'm thinking this may have fried my Arduino. Makes me feel stupid but I guess I'm paying my newbie dues! 

Coding Badly

Quote
I did some further testing just now to see if I could get a response through the serial monitor by looping TX back to RX and got nothing


With the processor held in reset?  Or with the processor removed from the Arduino?

Yankee

Code: [Select]
With the processor held in reset?  Or with the processor removed from the Arduino?
The processor was still in the Arduino board and not held in reset.

Coding Badly

You need to rerun the loop-back test with the processor "disabled"; pick ONE...

- Carefully place a jumper between the RESET pin and the GND pin

   ...OR...

- Remove the processor from the board

Yankee

OK. I did the loop-back test both ways.
Quote
- Carefully place a jumper between the RESET pin and the GND pin

-negative

Quote
- Remove the processor from the board

-loop-back successful.

I guess this tells me the FTDI converter is OK and the processor is toast?

Go Up