Pages: [1]   Go Down
Author Topic: Trouble running a 644 at 3v & 8MHz  (Read 982 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Everybody,

I recently picked up a Sanguino and am trying to configure it to run off a 3V regulator. I swapped the 7805 regulator for a MCP1700-300 and the 16MHz crystal for an 8MHz one.

Prior to making the changes I verified I had everything set up and working by loading the "blink" example using the Arduino IDE. That worked just fine. After swapping the parts the Sanguino powers up and blinks the led as expected. My problem is that when I try to load a different sketch I get the typical "sync" error indicating that the board isn't responding.

After Googling and digging around a bit I found that the boards.txt file has a cpu speed entry that was 16000000L, I changed that to 8000000L but I still get the sync error.

I've found several references to the Fuses in the 644 chip. Unfortunately what I've found doesn't seem to provide a consistent answer and I've managed to confuse myself about how and what to do to configure the fuses in the way I need to.

For clarity, what I want to be able to do is use the Arduino IDE to load sketches to a Sanguino board running at 3V with an 8MHz crystal.

Would anybody know what the proper fuse configuration should be for what I'm trying to do?

Thanks!e
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suspect the your problem is with the bootloader code now running at 8mhz when it is hardcoded to run at a certain baudrate at a 16mhs clock speed. There is an entry in the boards.txt file that tells the IDE what baudrate to upload sketches at, which it passes to AVRDUDE that performs the uploading.

Example:  diecimila.upload.speed=19200

Just change the corresponding value for your Sanguino entry to 1/2 the baudrate it presently has. I think that will get you going.

Lefty

« Last Edit: March 03, 2011, 04:58:59 pm by retrolefty » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank You Sir!

That little change allowed me to once again load software to load software to my Sanguino.

For the record, (and those in the future with the same problem) here's my C:\Program Files\arduino\hardware\Sanguino\boards.txt file:

##############################################################

sanguino.name=Sanguino
sanguino.upload.protocol=stk500
sanguino.upload.maximum_size=63488
sanguino.upload.speed=19200
sanguino.bootloader.low_fuses=0xFF
sanguino.bootloader.high_fuses=0xDC
sanguino.bootloader.extended_fuses=0xFD
sanguino.bootloader.path=atmega644p
sanguino.bootloader.file=ATmegaBOOT_644P.hex
sanguino.bootloader.unlock_bits=0x3F
sanguino.bootloader.lock_bits=0x0F
sanguino.build.mcu=atmega644p
sanguino.build.f_cpu=8000000L
sanguino.build.core=arduino


note the changes to upload.speed and build.f_cpu.

While we're at it, what would it take to fix this problem for real and set upload speed to it's real value?

I've picked up an AVRIDE programmer (not a mk II though) but it doesn't seem to have a driver for my XPx64 machine.
(I'll be trying that on my XPx32 machine at work tomorrow)

Thanks again for the help!!! smiley
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
While we're at it, what would it take to fix this problem for real and set upload speed to it's real value?

The bootloader program ( ATmegaBOOT_644P.hex) would have to be recompiled to change the baudrate to the prior rate using the new slower 8Mhz clock speed, or possible just patched? Neither of those things can be performed from the Arduino IDE, I believe.

Lefty
« Last Edit: March 03, 2011, 10:30:15 pm by retrolefty » Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 111
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent.

I am looking at using a 644 at 8mhz and this is just the info I needed.
I am guessing if I want to run it at 4mhz I simply half those values again.
Logged

Pages: [1]   Go Up
Jump to: