Welcome! Log In Create A New Profile

Advanced

Running a Sanguino @ 3.3V and 8MHz

Posted by tmbomber 
Running a Sanguino @ 3.3V and 8MHz
March 17, 2011 09:25PM
Hello Everybody,

A couple weeks ago I tried running a Sanguino at 3.3V and 8MHz. I ran into some trouble and tried to get some assistance on the Arduino forums. ( [arduino.cc] ) I've presently got things working by doing what was suggested there. (I'm running on 4 AA batteries right now)

I wound up modifying the boards.txt file as follows:

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

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


This worked and I'm presently able program from the Arduino IDE (rev 0022)

I've been noticing that some delay()'s in my software don't seem to be waiting as long as they did on my Arduino Pro, and I've had to modify them to get things working again. I'm thinking that even though everything seems to be working right now, I'm not running things the way they oughta be.

The last post in the above thread suggested recompiling the boot loader. Doing that is somewhat beyond my present capability. Just tonight I found the Sanguino forum here and was wondering if someone's already done this.

Any assistance would be greatly appreciated.
Re: Running a Sanguino @ 3.3V and 8MHz
March 18, 2011 07:20AM
Did you adjust F_CPU in config.h? Can't speak for FiveD, but Teacup has all the equipment to be adjusted for different clocks. Some people run the ATmega at 20 MHz, a free 25% performance upgrade, after all.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Running a Sanguino @ 3.3V and 8MHz
March 19, 2011 05:16PM
Hello again.

Unfortunatly I'm running neither FiveD nor Teacup. I did a search of my entire Arduino subdirectory tree for "config.h" and came up with no files found.

I'm running the Sanguino board on four AA batteries and a 3.3V regulator for compatibility with other chips it's interfacing to. (running at 3.3V allows me to connect to other stuff without having to deal with level shifters. This is an smd board and it needs to be very low power and as small as possible.)

From the '644 datasheet you need at least 4.5V to run above 10MHz, you *can* run a '644 at 20MHz, but not at 3.3V.

I was hoping someone had already done it, but I'm gathering that I'm going to have to recompile the '644s bootloader from source.

Anybody know of a good toot or howto on how to do that???
Re: Running a Sanguino @ 3.3V and 8MHz
March 20, 2011 05:52AM
If you have an ATmega644P, 2.7 Volts are sufficient to run at 20 MHz. If your Firmware can't deal with different CPU clocks, you should consider changing or fixing the Firmware.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Running a Sanguino @ 3.3V and 8MHz
March 20, 2011 03:05PM
I just went and checked the datasheet for a 644P:

[www.atmel.com]

Figure 25-2 in section 25.2 which can be found on page 329. Is titled:

"Maximum Frequency vs. VCC, ATmega164P/324P/644P"

The graph of safe operating frequencies shows a maximum frequency of 10MHz at 2.7V, ramping linerally to 20MHz at 4.5V. From that, the maximum frequency at 3.3V would be well less than 16MHz. So I don't think your first statement is quite correct. Have you run a 644P at 3.3V and 20MHz with good result???

As to changing my firmware, that's why I was asking if anybody had a good howto on recompiling the bootloader.

I'm also exploring running without a bootloader. I picked up an ISP programmer and was thinking of trying this:

[arduino.cc]

That would just bypass my bootloader questions.
Re: Running a Sanguino @ 3.3V and 8MHz
March 21, 2011 05:30AM
I had a look at p422 of the same document. Interesting, how these numbers apparently are contradicting.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Running a Sanguino @ 3.3V and 8MHz
March 21, 2011 07:35PM
I went and checked page 422, it seems there's a little "3" next to "Speed(MHz)" at the top of the first column...

At the bottom, note 3 says:

For Speed vs. VCC see ”Speed Grades” on page 329.

So I guess they're covered.

Tonight I'm going to give my AVR ISP programmer a try.
Re: Running a Sanguino @ 3.3V and 8MHz
March 21, 2011 09:09PM
i do think that the reprap could benefit a little from a slight speed boost.


[mike-mack.blogspot.com]
Re: Running a Sanguino @ 3.3V and 8MHz
March 22, 2011 07:58AM
Quote

So I guess they're covered.

You are. I was mistaken.


Quote

i do think that the reprap could benefit a little from a slight speed boost.

Replace the 16 MHz crystal on your board with a 20 MHz one, change boards.txt in the Arduino IDE accordingly and cross your fingers firmware properly respects F_CPU. In other forums I've read you can even overclock to 25 MHz without converting the ATmega into fume.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Hi tmbomber,

I know there is a massive time delay, but I wanted to know if you ended up getting the bootloader working? Or, if you ended up forgetting about the bootloader?

Thanks
Sorry, only registered users may post in this forum.

Click here to login