Pages: 1 2 [3]   Go Down
Author Topic: Arduino using external clock and 1mhz  (Read 5725 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

By the way - the port is set to 19200 baud in control panel.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is definitely it!  I intercepted the command being generated and updated the baud rate in there from 9600 to 19200, see below, and IT WORKED!!!  So how to i make the IDE use a baud rate of 19200 when generating these command lines?

Code:
C:\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM5 -b19200 -Uflash:w:C:\Users\Sean\AppData\Local\Temp\build3447786868117704274.tmp\Blink.cpp.hex:i

My boards.txt is below and contains the 19200 baud.

Code:
atmega328Pbb0.name=ATmega328P @ 1 MHz  (external oscillator; BOD level1)

atmega328Pbb0.upload.using=arduino:arduinoisp
atmega328Pbb0.upload.maximum_size=32768
atmega328Pbb0.upload.speed=19200
atmega328Pbb0.bootloader.low_fuses=0x4c
atmega328Pbb0.bootloader.high_fuses=0xD7
atmega328Pbb0.bootloader.extended_fuses=0xfe
atmega328Pbb0.bootloader.path=empty
atmega328Pbb0.bootloader.file=empty328Pat1.hex
atmega328Pbb0.build.mcu=atmega328p
atmega328Pbb0.build.f_cpu=1000000L
atmega328Pbb0.build.core=arduino:arduino
atmega328Pbb0.build.variant=arduino:standard
« Last Edit: May 20, 2012, 03:10:41 pm by r55boy » Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 211
Posts: 13044
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

atmega328Pbb0.name=ATmega328P @ 1 MHz  (external oscillator; BOD level1)
atmega328Pbb0.upload.protocol=arduino
atmega328Pbb0.upload.maximum_size=32256
atmega328Pbb0.upload.speed=19200
atmega328Pbb0.bootloader.low_fuses=0x4c
atmega328Pbb0.bootloader.high_fuses=0xD7
atmega328Pbb0.bootloader.extended_fuses=0xfe
atmega328Pbb0.bootloader.path=empty
atmega328Pbb0.bootloader.file=empty328Pat1.hex
atmega328Pbb0.build.mcu=atmega328p
atmega328Pbb0.build.f_cpu=1000000L
atmega328Pbb0.build.core=arduino:arduino
atmega328Pbb0.build.variant=arduino:standard
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Coding - with these change to boards.txt i get error "avrdude: Can't find programmer id "arduino".

i have uploaded ArduinoISP to my programmer board and have it hooked up to the target on a breadboard.

My problem is just now that the Arduino environment seems to be setting the avrdude -b parameter to 9600 when it should be 19200 and i cant see why.  when i manually invoke avrdude and use -b 19200 it works.

thanks again for your help on this mate.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 211
Posts: 13044
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Remove this line from your boards.txt file...

atmega328Pbb0.upload.using=arduino:arduinoisp
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Coding - i dont have that line in there - just the lines in your posting below.  i guess its the upload.protocol it doesnt like ?

Boards.txt below.  Remember my only problem now is just the baud rate it is insisting on using...

Thanks...

Code:
atmega328Pbb0.name=ATmega328P @ 1 MHz  (external oscillator; BOD level1)

#atmega328Pbb0.upload.using=arduino:arduinoisp
atmega328Pbb0.upload.protocol=arduino
#atmega328Pbb0.upload.maximum_size=32768
atmega328Pbb0.upload.maximum_size=32256
atmega328Pbb0.upload.speed=19200
atmega328Pbb0.bootloader.low_fuses=0x4c
atmega328Pbb0.bootloader.high_fuses=0xD7
atmega328Pbb0.bootloader.extended_fuses=0xfe
atmega328Pbb0.bootloader.path=empty
atmega328Pbb0.bootloader.file=empty328Pat1.hex
atmega328Pbb0.build.mcu=atmega328p
atmega328Pbb0.build.f_cpu=1000000L
atmega328Pbb0.build.core=arduino:arduino
atmega328Pbb0.build.variant=arduino:standard
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Guys any idea here?  All seems correct, and Coding Badly has this working, but no joy for me.  I've been tearing my hair out for a month now, and certainly know so much more about boards.txt etc etc, but fail with the baud rate that it insists on using, despite me telling it otherwise. Arghhhh!

Thanks for any steers...
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4820
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't be sure but you could try to back up your boards.txt and actually remove the lines you have commented out.

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 211
Posts: 13044
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


If everything else is correct (e.g. the entry in boards.txt) the baud rate is defined in the programmers.txt file...

arduinoisp.name=Arduino as ISP
arduinoisp.communication=serial
arduinoisp.protocol=stk500v1
arduinoisp.speed=19200
Logged

Pages: 1 2 [3]   Go Up
Jump to: