Pages: 1 [2] 3   Go Down
Author Topic: requirements and limits of 8Mhz 3.3v  (Read 4022 times)
0 Members and 1 Guest are viewing this topic.
Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4086
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well be sure to post pictures when you get that working!
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im having the problem where after I upload the bootloader and then upload with the ide it seems to erase the bootloader
I make an alternate board with the fuse and speed of the 8mhz and added the new bootloader to the optiboot folder and named that as the bootloader, which all works great except it erases the bootloader,
what do I need to do to allow it to keep the bootloader after a regular ide upload?
I read the fuses back and I got h;d7 l;e2 e;05

On another note, do you know anything about. Bat files? I made myself a nice one that. Remembers my board, programmer setting for avr dude and easily upload with just inputting the hex
I want to make a. Bat file that changes the boards.txt file from in the section of signature under my new board from the 328p sig to the 328 so I can use the ide burn bootloader much quicker without going and altering the boards txt everytime by hand, I know echo [sig] > boards.txt overwrites and >> appends to the end but how can I alter a single line?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4086
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Uploading a sketch from the IDE via ICSP will erase the bootloader, leaving just the sketch in flash memory.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im not uploading wit isp though, I only do that to get the bootloader on there with avr dude, then upload the sketch normally through usb
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could it be that I didn't set the lock bits?  I see that in the boards.txt file, how are those used?
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I did the locks this time and still the bootloader disappeared after a regular upload
: /
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4086
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's unusual. What programmer are you using, and are you burning the bootloader from the IDE or outside the IDE (not that either shouldn't work, but...)

If burning the bootloader from the IDE, lock bits should be handled, see the board.txt entry earlier in the thread.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did it outside the ide, ill try it with the ide when I get home and see what happens
But if I did it outside it shouldn't make a difference, very weird
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4086
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

FWIW, here's a batch file I use...
Code:
echo off
echo ** Write optiboot (Arduino Uno) bootloader on ATmega328P chip
avrdude -c usbtiny -p m328p -v
echo ** Chip erase
avrdude -c usbtiny -p m328p -e
echo ** Set fuses
avrdude -c usbtiny -p m328p -U lfuse:w:0xff:m -U hfuse:w:0xde:m -U efuse:w:0x05:m
echo ** Write bootloader...
rem avrdude -c usbtiny -p m328p -U flash:w:optiboot_atmega328.hex
avrdude -c usbtiny -p m328p -U flash:w:optiboot_atmega328_westfw_2011-06-15.hex
echo ** Lock
avrdude -c usbtiny -p m328p -U lock:w:0x0f:m
echo ** Bootloader written!
avrdude -c usbtiny -p m328p -v
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Durham UK
Offline Offline
Full Member
***
Karma: 1
Posts: 167
aka Craig Turner
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

The (me)duino sounds like great fun!

If you are looking to build to a low power spec, I can definitely recommend this power saving tutorial by Nick Gammon.

http://www.gammon.com.au/forum/?id=11497]http://www.gammon.com.au/forum/?id=11497[/url]

I got my board to use sleep and interrupts, voltage at 3.7v from lipo and current during sleep < 6uA, from using the tutorial. I set fuses to disable brown-out detection and use internal 8MHZ osc. ADC disabled during sleep.

Cheers
Logged

Craig Turner, blog: http://gampageek.blogspot.co.uk/ It helps with my learning if I write things down, esp. for others to follow (constructive comments welcomed to improve)

0
Offline Offline
Full Member
***
Karma: 0
Posts: 153
veroboaring is the new XGame - Extreme Veroboarder
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Jack!
Can you send me the source code of this optiboot version? I want to know if the watchdog are implemented.

I will upload using the Arduino as burner.

What winAVR version do you use to build it?

Best regards!
Frank
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4086
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Jack!
Can you send me the source code of this optiboot version? I want to know if the watchdog are implemented.

I will upload using the Arduino as burner.

What winAVR version do you use to build it?

Best regards!
Frank

Hi Frank,

Source code is from Arduino 1.0, find it in hardware\arduino\bootloaders\optiboot

WinAVR is 20100110 which I believe is the latest version.

Cheers ... Jack
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4086
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

FYI, here is my boards.txt entry to use the 8MHz Optiboot bootloader. I just modified the .path and .file lines to point to the new bootloader (original lines commented out).

Code:
pro328.name=Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328

pro328.upload.protocol=stk500
pro328.upload.maximum_size=32256
pro328.upload.speed=57600

pro328.bootloader.low_fuses=0xFF
pro328.bootloader.high_fuses=0xDE
pro328.bootloader.extended_fuses=0x05
pro328.bootloader.path=optiboot
pro328.bootloader.file=optiboot_atmega328_pro_8MHz.hex
#pro328.bootloader.path=atmega
#pro328.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
pro328.bootloader.unlock_bits=0x3F
pro328.bootloader.lock_bits=0x0F

pro328.build.mcu=atmega328p
pro328.build.f_cpu=8000000L
pro328.build.core=arduino
« Last Edit: July 17, 2012, 08:56:10 am by Jack Christensen » Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Washington DC
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,

thanks a lot for the "boards.txt" file. I used it in combination with the earlier posted optiboot code (optiboot_atmega328_pro_8MHz.hex) and an UNO R3 as a programmer for the 3.3V 8Mhz ProMini board. Uploading the bootloader worked very well. However, when trying to upload a sketch via the Ardunio IDE, I got the following error message: "avrdude: Yikes!  Invalid device signature. Double check connections and try again, or use -F to override this check."  Does anyone have an idea how to tackle that problem?
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think you have a 328 not a 328p, you will probably have to do it manually with avrdude to either overide the check or change it to the proper one
Logged

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