Page 1 of 1

USB Programming Cable

Posted: Thu Sep 20, 2012 11:25 pm
by Bryan
Hi Roberto:

Managed to pick up a FTDI FT232RL USB to TTL Serial cable with the following output wires.

Red wire 5V
Black wire GND
White wire RXD
Green wire TXD
Yellow wire RTS
Blue wire CTS

Looking at the schematic I assume the only lines needed from the cable are the 5v ,GND, RXD and TXD lines.?

Cheers

Re: USB Programming Cable

Posted: Fri Sep 21, 2012 7:58 am
by rimai
You need rts too.
That's what will reboot the controller to kick in the bootloader.

Re: USB Programming Cable

Posted: Fri Sep 21, 2012 8:48 am
by Bryan
Thanks Roberto, will give it a try tonight, which pin does RTS go to on the board, don't see it on the schematic. I do see CTS, is RTS the first pin?

Re: USB Programming Cable

Posted: Fri Sep 21, 2012 8:51 am
by rimai
It's the one that goes to the jumper

Re: USB Programming Cable

Posted: Fri Sep 21, 2012 11:57 pm
by Bryan
Hi Roberto:

Well no luck...trying from scratch to upload the bootloader. Tools-->Burn Bootloader. Selecting Reef Angel Controller/W optiboot. Port is Com 21, and device manager shows checkbox "Set RST on close" is selected.

Looking at the connector from left to right I have it wired as

NC, +5, RTS,RX,TX,NC,NC,GND


Tried reversing the rx and tx lines same thing. The RST jumper on the board just above the 8 pin connector is closed.

Code: Select all

C:\Reef_Angel\hardware/tools/avr/bin/avrdude -CC:\Reef_Angel\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM21 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xde:m -Ulfuse:w:0xff:m 

avrdude: Version 6.0, compiled on Apr  6 2012 at 19:29:19
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Reef_Angel\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM21
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
avrdude: stk500_getsync(): not in sync: resp=0x0c

avrdude done.  Thank you.

Re: USB Programming Cable

Posted: Sat Sep 22, 2012 2:37 am
by Bryan
Hi Roberto:

Just an update. Was successful in flashing the Optiboot to the RA using Atmel Studio and a ISP connection. All seems to be well now and I can upload sketches using the USB cable and Arduino. Don't know why i couldn't upload the boot-loader from Arduino though, perhaps the fuses were all messed up?

Re: USB Programming Cable

Posted: Sat Sep 22, 2012 8:23 am
by rimai
Cool!!
What about the behavior you were getting before?
Is it fixed too?

Re: USB Programming Cable

Posted: Sat Sep 22, 2012 1:31 pm
by Bryan
Programming issues have been resolved, I can upload the internalmemory sketch and follow it up with another sketch and no error. So it must have been a issue with Atmel Studio programming tool.

Only issue I am having is the T1-T3 and PH Error:
http://forum.reefangel.com/viewtopic.ph ... T1%3Aerror

Th\ink it might be board related, but that doesn't really make sense as the PH and temp circuitry are completely separate. Wanted to try and debug using Visual Micro but not having much success. What about you, any luck using the debugger?