Go Down

Topic: Arduino using external clock and 1mhz (Read 6243 times) previous topic - next topic

r55boy

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

r55boy

#31
May 20, 2012, 09:54 pm Last Edit: May 20, 2012, 10:10 pm by r55boy Reason: 1
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: [Select]
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: [Select]
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

Coding Badly

[font=Courier New]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
[/font]

r55boy

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.

Coding Badly


Remove this line from your [font=Courier New]boards.txt[/font] file...

[font=Courier New]atmega328Pbb0.upload.using=arduino:arduinoisp[/font]

r55boy

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: [Select]
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

r55boy

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...

GoForSmoke

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

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

Coding Badly


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

[font=Courier New]arduinoisp.name=Arduino as ISP
arduinoisp.communication=serial
arduinoisp.protocol=stk500v1
arduinoisp.speed=19200[/font]

Go Up