Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: dfoley23 on January 13, 2010, 12:13:31 AM

Title: UART & STK serial dongle programmer
Post by: dfoley23 on January 13, 2010, 12:13:31 AM
When trying to add UART functionality to my $50 i get a connect failed message when trying to connect to my serial programmer. I have read another post saying thats its because i need to use ponyprog instead to enable the fuses, thats here
http://www.societyofrobots.com/robotforum/index.php?topic=5004.msg77044#msg77044 (http://www.societyofrobots.com/robotforum/index.php?topic=5004.msg77044#msg77044)
the solution was to enable fuse CKDIV8 but my options in ponyprog
http://i786.photobucket.com/albums/yy143/sinned23/ponyprog.jpg (http://i786.photobucket.com/albums/yy143/sinned23/ponyprog.jpp)
it doesnt have a CKDIV8 option, i see in the tutorial CKDIV8  divides the system clock by 8? so what in my list of option does this? Thanks for the help.
Title: Re: UART & STK serial dongle programmer
Post by: rgcustodio on January 13, 2010, 06:25:15 AM
Have you correctly specified that you are using an "ATmega8" or "ATmega8L" in the software?
Also, have you tried a different version of the software?
Title: Re: UART & STK serial dongle programmer
Post by: dfoley23 on January 13, 2010, 12:30:08 PM
In ponyprog my settings have AVRmicro as the device family and ATmega8 as the device type and i have programmed it succesfully. I havent tried a different version of the software, I have version 2.07c. any idea what version i need.
Title: Re: UART & STK serial dongle programmer
Post by: dfoley23 on January 13, 2010, 03:07:15 PM
ok i see in the tutorial, the version used is v2.06f BETA. i downloaded from the link and installed but i still dont see the same options, or the CKDIV8 option  ???.
Title: Re: UART & STK serial dongle programmer
Post by: Pierre on January 14, 2010, 06:36:35 PM
Hi

     Working to figure out the UARt with the $50 robot as well body.

  http://174.120.175.50/~sor/robotforum/index.php?topic=9944.0 (http://174.120.175.50/~sor/robotforum/index.php?topic=9944.0)

     Sorry I can not help you with the part loading to the ATmega 8 or 168 as I am using the AVRISP mkII with the RS232 Shifter board(RX is flashing).

8MHz:  My first thought process was that the ATmega8 and ATmega168 was at 1MHz by default because that CKDIV8 is "ON" meaning CKDIV8=divided by 8 so to be at 1MHz.
     
          BUT As for the fuse.  The fuse tab setting  "CKDIV8 is check( at this time the website can not show picture) but will not "VERIFY" if uncheck.  I beleive it to be at 8MHz for the following reason:

          1.  Fuse Advance tab "Calibrate for Frequency" is at 8.0MHz; and
          2.  Global.h  #define F_CPU  8000000.
     
In a way I am glad that I am not the only one with troubleshooting with UART.  I am sur that on SoR forum we will find someone with solutions.  Until then I read and read.
Title: Re: UART & STK serial dongle programmer
Post by: dfoley23 on January 14, 2010, 08:44:27 PM
So i see in the Atmega8 datasheet CKSEL3..0 is what can change the range of the freqency of the chip of the oscillator, and with the SUT1 SUT0 fuses that will decide the startup times of the oscillator. The CKOPT says it switches between a wide swing of output (checked) and a small swing of output (unchecked). BODLEVEL is Brown-out protection, BOOTRST is a boot reset, BOOTSZ1 & BOOTSZ0 declares the boot size, WDTON is the "Watchdog timer", and EESAVE saves the EEPROM memory. Still I dont know which would replace the CKDIV8 option in avr studio?
sorry I dont know why the pic link stopped working here it is
(http://i786.photobucket.com/albums/yy143/sinned23/ponyprog.jpg)
Title: Re: UART & STK serial dongle programmer
Post by: dfoley23 on January 15, 2010, 05:26:56 PM
Ok hehe, when i did a search for this i searched only in Electronics, but I corrected my foolish ways and searched the whole forum and found another user with the same problem
http://174.120.175.50/~sor/robotforum/index.php?topic=3882.0 (http://174.120.175.50/~sor/robotforum/index.php?topic=3882.0)
and the solution there worked and now my UART connection is working perfectly