Pages: [1] 2   Go Down
Author Topic: Help needed to restore original pin settings!  (Read 1654 times)
0 Members and 1 Guest are viewing this topic.
St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: March 10, 2011, 02:29:50 am by Yankee » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13072
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Anything connected to the Arduino?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 130
Posts: 8620
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13072
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-sad
I'm going to get a new board this afternoon and swap processors to determine if I also ruined the 328 chip.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8974
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Colorado
Offline Offline
Full Member
***
Karma: 2
Posts: 220
Arduino 0022 and Ubuntu 11.10 64bit.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13072
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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! 
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13072
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
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.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13072
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1] 2   Go Up
Jump to: