Welcome! Log In Create A New Profile

Advanced

Help with uploading program

Posted by Keith 
Help with uploading program
March 01, 2010 11:18PM
Hey all,

I have all but finished the construction of a Mendal. Just have the heated nozzle to make. I have run into a problem with uploading to the motherboard. I am using the Arduino software to upload via the FTDI.

sketch compiles ok...but I get this error:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
I have been all over the Arduino website and troubleshooting - no luck. Any help would be great!!

Win xp
Gen 3 electronics

Cheers,

Keith
Re: Help with uploading program
March 02, 2010 02:32AM
Keith,

I would check all of the following:
1. Is your Atmega644p bootloaded?
2. Did you use the correct bootloader file?
3. Does your OS, and therefore the Arduino s/w "see" the FTDI COM-port?
4. Is the pin out config of Atmega644p correct i.e. is IC correctly laid out on motherboard?
5. Lastly, when programming, it is sometimes necessary to
5.1.Start Arduino f/w download and
5.2.hold down reset-button for 10sec, then release

This last point worked for me.
I hope this helps you.
Good luck.
Marius Botha
Pretoria, South Africa
[mariushermanbotha.wordpress.com]

PS. If you are still stuck, try and give more information, that you may think is relevant, as this particular issue can be caused by quite a few things.
Re: Help with uploading program
March 02, 2010 09:43PM
Marius,

Ok first a bit more info. This is a reprap motherboard V1.2 Sanguino. I believe I have the correct bootloader in the chip. I have downloaded and followed the instructions for adding the Sanguino to Arduino software. It uploaded fine. I can then only assume it is correct. I will double check this of course. OS-XP sees the FTDI com port- and the Arduino reports this available as well.
The chip is correctly placed on the board (checked that at least 4 time before flowing). No solder bridges as I can see with a magnifier. I have also tried various reset hold downs and unplugging and plugging in the usb to the board many times.

I did manage once to get a "upload complete" message although it was followed by the same message I am writing about.

Reset button when pressed causes the red debug led to flash 3 times pause and then another...this sounds normal from what I read.
I have also tried uploading from a fresh install of XP on a different machine. No antivirus or other programs running.

Thanks for any help!!

Keith
Re: Help with uploading program
March 03, 2010 02:23AM
keith,

I feel your pain! It is ridiculously dreary when you get stuck with operational problems, like programming the AVR chip.
At any rate, the suggestions below are not cast in stone, but merely suggestions for possible areas you might want to double-check - if you have not done so already.

1. jumper j2 - check that J2 is correctly jumpered. I do not have a Gen3 board at hand, but if memory serves, it is located directly above ICSP header.
2. upload verbose - try using avrdude directly from commandline, with verbose option, and post to this forum.
3. reburn bootloader - this is a rather drastic option, but no harm in checking everything. Incidentally, have you bootloaded the CPU yourself?
4. re-check pinout on FTDI-serial conn - I am sure you have done this already.
5. baudrate on the COM port - change baudrate to max value.

Incidentally, what status does "Device Manager" report for your USB-COM port? DeviceManager will normally state whether the device-driver was successfully installed, or not.
I modified a Nokia 6101 CA-42 USB-data cable , and this worked very well for me, although I did have device driver issues.

I hope this helps.
Best of luck.
Marius Botha
Pretoria, South Africa
[mariushermanbotha.wordpress.com]
Re: Help with uploading program
March 03, 2010 11:57PM
Marius,

Again I must thank you for your help and suggestions!!

Device manager reports FTDI on com3 port settings are 19200 bits per second, data bits 8, parity none, stop bits 1, flow control none.

Jumper2 checks out and is in place (your memory is good!)

I have bootloaded myself using tinyusb. Works great!

I have tried this using 2 different FTDI same results.

Verbose:

Binary sketch size: 18568 bytes (of a 63488 byte maximum)
C:\Documents and Settings\k\Desktop\arduino-0018\hardware/tools/avr/bin/avrdude -CC:\Documents and Settings\k\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega644p -cstk500v1 -P\\.\COM3 -b38400 -D -Uflash:w:C:\DOCUME~1\k\LOCALS~1\Temp\build1320806271202850555.tmp\FiveD_GCode_Interpreter.cpp.hex:i


avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
Copyright (c) 2000-2005 Brian Dean, [www.bdmicro.com]

System wide configuration file is "C:\Documents and Settings\k\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf"

Using Port : \\.\COM3
Using Programmer : stk500v1
Overriding Baud Rate : 38400
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: Send: Q [51] [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done. Thank you.


Re-burned bootloader...
Same problem.
I am afraid i am rather new to this side of electronics and programming!

Hope this info helps you help me! Thanks again.

Keith
Re: Help with uploading program
March 04, 2010 09:33AM
keith,

1. check that 5v is supplied via USB-A. That means green power LED should be lit.
I had to "hotwire" my cellphone USB-datacable, to get correct power setting.
2. Also, your baudrate settings are different: the COM-port setting is 19200, but Arduino tx @38400.
3. You might also want to try a different USB-serial adaptor.
SEE [brewtroller.com]

Best of luck, my friend.
Let me know how it goes.
Marius Botha
Pretoria, South Africa
[mariushermanbotha.wordpress.com]
emt
Re: Help with uploading program
March 04, 2010 02:49PM
Hi

I had this problem. I see you have TinyUSB. I use this to upload programmes not just bootloader. Details here:-

[www.arduino.cc]

I think the instructions are pretty clear.

Any problems shout.


Regards

Ian
Re: Help with uploading program
March 04, 2010 07:53PM
Excellent! Success with the tinyusb and following the instructions on the Adruino website.

Program uploaded and on the way to finishing the machine!

Thanks for all the help.

I am still unsure why the FTDI did not work. May come back to that one day.

Thanks again all!

Keith
Re: Help with uploading program
March 05, 2010 10:35AM
Program uploaded...although having issue with x axis not responding now. I think this is in the program...as the board checks out on other axis's. I am using the reprap software and the as described setup on the reprap home page. Or maybe the ftdi?? is there a way to use the usbtiny with the reprap software instead of the ftdi?

Pretty new to this as you may notice!

THanks,

KEith
emt
Re: Help with uploading program
March 06, 2010 01:47PM
Hi

You don't say which firmware? 5D?

Although I also could not upload firmware with the ftdi once it was uploaded the ftdi worked fine for communication.

I would try using a terminal programme to send commands to the motherboard.

G1 X20 F100 should move the X 20mm.

Note the command must terminate with carriage return and line feed. The firmware should respond with "ok".

(Actually this needs checking as I am using an old version of the firmware so it may be a good idea to look through the code you uploaded and confirm this is still the case. Look for the following code in process_string.pde)

if (serial_count && c == '\n')
{
// Terminate string
cmdbuffer[serial_count] = 0;
//process our command!
process_string(cmdbuffer, serial_count);
//clear command.
init_process_string();
// Say we're ready for the next one
Serial.println("ok");
}


Regards

Ian
Re: Help with uploading program
March 07, 2010 06:18PM
Hi Ian,

I am afraid I know nothing about the firmware code.

The current version of the 5d from the reprap repository did not compile using the Arduino software so I dug around a bit and am not really sure what version I am on. It is the FiveD though. V1.3 and Sanguino v1.6. There is no file named process_string.pde although there is a file process_g_code.

Is there any manual / instructions for the code available? I could then work my way through it. I can send you the files I have if you are interested in having a look. feel free to write me at khrach@telus.net.

Thanks!

Keith
emt
Re: Help with uploading program
March 08, 2010 04:25AM
Hi Keith

I take it you are using the motherboard with Sanguino. Can you confirm this? If so I think you need to get the current Mendel firmware compiling properly. Once that is done you can then start to solve other problems. I don't know of any published manual about the firmware. I had to start reading the code and learning from that bit by bit. If you break it down to small parts some of it is fairly basic especially the communication section.


Regards

Ian
Re: Help with uploading program
March 08, 2010 04:33PM
Hi Ian,

Yes it is the motherboard with the Sanguino. As I suspected there was no manual. Thanks for the info regardless!


Cheers,

Keith
emt
Re: Help with uploading program
March 09, 2010 08:00AM
Hi

I downloaded the latest FiveD_GCode_Interpreter firmware version. It compiled fine for me. The firmware does still respond with "OK" when sent commands from a terminal. The file handling handing the serial commands from the host is process_g_code.pde

I suggest you concentrate on getting the firmware to compile. Report any errors/problems here. Once that is done we can sort out your comms.


Regards

Ian
Re: Help with uploading program
March 09, 2010 02:24PM
Hi Ian,

Firmare did compile. Although I had to go back to Arduino 16 for it to work. I had been using Arduino 18.

Now after it compiled and uploaded none of the steppers work. What Terminal software are you using?

Keith (feeling like there is something silly I am not doing.)
Re: Help with uploading program
March 09, 2010 02:36PM
Reloading the firmware brings back the 2 axis...so this is where I am:
Using the Arduino16 everything compiles and loads as expected.
Axis y and Z responding as expected through the reprap host software.

I am investigating the Process_g_code.pde now.

Getting there I think.

Thanks for the help!

KEith
Sorry, only registered users may post in this forum.

Click here to login