Pages: [1]   Go Down
Author Topic: Arduino compatable hardware - bootloader-fuse questions  (Read 1269 times)
0 Members and 1 Guest are viewing this topic.
St. Peters, Mo
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've built what I believe to be a Arduino compatable board based on these boards: http://arduino.cc/en/Main/ArduinoBoardSerialSingleSided3  and http://arduino.cc/en/Main/ArduinoBoardDiecimila 
Mine uses the FT232R like the Diecimila and uses the cap coupled DTR for AVR reset.

Board works using CodeVision AVR and Bascom and I use an older Atmel AVR ISP (RS232 version).   I'm having limited success with the Arduino IDE, I'm using Version 0022. 

Scenario #1 Using a M168 P and set the board as a Diecimilia with a M168 I have no sketch downloading success regardless of bootloader loaded via the AVR ISP and AVR Studio.   Always ends with a AVRdude error no sync....

Scenario #2 Using a M328 P and using the ADAboot loader and setting it to either a Pro 16mhz M328 or the  Duemilanove M328 I can download a sketch once and it executes fine.  From that point on though the only way I can get it to download a sketch is to reload the bootloader with the AVR ISP via AVRstudio.  Using a hardware reset, the sketch starts running again or power cycling the same.

My guess is the sketch is overloading a part of the bootloader or something or the reset startup fuse setting is an issue. 

ANY IDEAS?????

THANK YOU,
Phil
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8103
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could it be that the auto-reset is not working?  Try using a manual reset: hold the Arduino reset button until the IDE says "Binary sketch size:", then immediately release the reset button.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

St. Peters, Mo
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think I found the M328 problem, bootrst fuse needed to be programed. 

However I'd really prefer using the M168, and so far nothing seems to work.
Logged

St. Peters, Mo
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Got it to work with the M168 also, again fuse settings.  Doesn't seem to be a FAQ anywhere on fuse settings?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8103
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Doesn't seem to be a FAQ anywhere on fuse settings?

The 'boards.txt' file has the fuse settings for various boards.  Did you use the Arduino IDE to burn the bootloader?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

St. Peters, Mo
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't realize the boards.txt file had that info, thanks.  Not sure how to translate the fuse bytes into appropriate bits used by avr studio.  I didn't use the Arduino IDE to upload the boot code as I assumed a blank AVR would need to be programmed via the isp first.   And I haven't figured out how to tel the IDE what serial port to use for a serial ATMEL AVR ISP, assuiming it's compatable with the IDE.
Logged

DeKalb, IL USA
Offline Offline
Full Member
***
Karma: 0
Posts: 243
KB9SXU
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Not sure how to translate the fuse bytes into appropriate bits used by avr studio.

The AVR Fuse Calculator works great for that http://www.engbedded.com/fusecalc/
Logged

Jeff K - JKDevices.com - home of the MegaMini

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6378
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here are fuses (via "fusebytes.pde") for a m168 with optiboot:
Code:
Compiled for ATmega168
No Serial Number

Fuse bits (L/H/E): C6 DD FC
Lock bits:         EF
Signature:         C 56 C (Signature not readable on non-P AVR)
Oscal:             94

Fuse Low = 11000110 (C6)
           ||||++++______Full Swing Crystal
           ||++__________Start Up Time=0
           |+____________Clock Output Disabled
           +_____________(no divide)

Fuse High = 11011101 (DD)
            |||||+++______Brownout at 2.7V
            ||||+_________EEPROM Erased on chip erase
            |||+__________Watchdog programmable
            ||+___________ISP programming enabled
            |+____________DebugWire off
            +_____________RST enabled

Fuse Extended = 11111100 (FC)
                |||||||+______Reset to Bootstrap
                |||||++_______256 words (512 bytes)

Lock Bits = 11101111 (EF)
            ||||||++______Read/Write to everywhere
            ||||++________R/W Application
            ||++__________No Write to Boot Section

Bootloader at 0x3E00 looks like version 4.4
 2411 B784 BE14 FF81 D0F0 E085 9380 81
Logged

Pages: [1]   Go Up
Jump to: