Loading...
  Show Posts
Pages: 1 ... 8 9 [10] 11 12 ... 14
136  Using Arduino / Project Guidance / Re: Some basic question about AVR chips and Arduino on: November 07, 2012, 10:33:00 am
Delete the bootloader.

Well, the bootloader is to enable serial communication through USB ? Not to change the fuse bits so as to use the external 16MHz crystal ?? LOL
137  Using Arduino / Project Guidance / Re: Some basic question about AVR chips and Arduino on: November 07, 2012, 10:16:47 am
Quote
Erm, I mean if I burn the bootloader to the chip, it will change the fuse bits of the AVR chip right ? So how about if I delete the existing bootloader in the AVR chip ??Will the HIGH fuse and LOW fuse changed or remain the same as in the bootloader file ?

The fuses and the bootloader are not directly related. Although the fuses usually are set when "burning" the bootloader, they can also be set independant of that as well as the opposite: updating a bootloader without changing the fuses.
You cannot delete a bootloader but you may overwrite it. So if you overwrite the Arduino bootloader with anything (a program or simply zeros), the fuses are not changed except you explicitly specify to do so. The fuses are not specified in the bootloader file, that's only program code. If you use the Arduino IDE to update a bootloader, the fuse bits are specified in the boards.txt file where you also find the bootloader file used when you select "Burn Bootloader" from the menu.

Ya, I can manually change the fuse bits also without uploading the bootloader, for eg the UNO bootloader. I can refer to the board.txt file to see what should I change to for the HIGH fuse and LOW fuse configuration. Correct ? Oh, so means once I burnt a bootloader inside, it for example changed the fused . But how do I remove the bootloader ? Any method ? Because once I tried before, I upload the bootloader, then the atmega 328 I can upload code into it through USB. But once I delete it, I cant upload through USB. But I noticed that the fuse bits remain the same. If the fuse bits is the same, why I cant upload using USB once deleted ?

Thank you
138  Using Arduino / Project Guidance / Re: Some basic question about AVR chips and Arduino on: November 07, 2012, 05:50:10 am
1: Sorta. Burning a bootloader, via the Arduino IDE, means that it'll change some fuses and add a program to the chip that waits a few milliseconds when the chip first gets power and listen for a command over serial that'll cause it to accept new code.

"program the chip through a USB cable" can mean a lot of things. Even without a bootloader you can do this, assuming you have something like an AVR ISP MKII. (If you do, you can hold shift and click upload to use it instead of the "normal" routine Arduino does). I'm really not sure what you're asking here so if you want more information you'll need to word that better.

The fuse bits will be changed if you use the Arduino IDE's "burn bootloader" feature. If you want to avoid this then you'll need to edit the boards.txt file, or learn to use avrdude and get an AVRISPMKII.


2: You don't /need/ to change the fuse bits. By default it'll work, but it'll run off its own internal clock and such. You're used to 16 mhz, but it'll ship at 128 khz. Obviously this throws things off, like the delay() function.

If you're trying to make a "standalone breadboard", so to speak, have a look at http://www.arduino.cc/en/Main/Standalone . It'll explain pretty much everything. (Note: The parts it lists are *requirements*, not suggestions, if you want to be sure your sketches work the same. Also, get an AVR ISP MKII. Do not use a second Arduino as a programmer. That tends to cause issues.)


3: There's a second AtMega on the Arduino boards that actually convert USB to Serial for the main CPU. You'll need a special device (Something like https://www.sparkfun.com/products/718 ) to do serial communication again, or use the Arduino IDE "normally" again (Not having to hold shift while clicking upload). A single chip won't do the trick.

That being said, the new Arduino Due actually communicates directly via USB, but you'll have to solder SMD to use it so the point's pretty moot in your case.

Erm, I mean if I burn the bootloader to the chip, it will change the fuse bits of the AVR chip right ? So how about if I delete the existing bootloader in the AVR chip ??Will the HIGH fuse and LOW fuse changed or remain the same as in the bootloader file ?
139  Using Arduino / Project Guidance / Some basic question about AVR chips and Arduino on: November 07, 2012, 02:35:29 am
Hey guys, I have some questions here which confused me. I want clarification from you guys smiley

1. For a fresh AVR chip like atmega 8, if I burnt the bootloader for atmega 8 into the chip, it means I can program the chip through USB cable right ? Burning bootloader means I change the fuse bits inside the chip. So if I remove the bootloader, it means I cant upload code from arduino IDE into the chip ? How about the fuse bits inside the chip ? Remain same or will return back to the fresh atmega 8 fuse bits ?

2. If let say I get a fresh AVR chip (atmega 328), then I need to change the fuse bits inside the chips then I only can upload code from arduino IDE ?

3. We are able to upload code from arduino IDE into the chip through USB cable is because there is the FTDI chip / a microcontrolller being programmer to be FTDI chp ? Or because we burn a bootloader into the chip ?

Thank you !!!
140  Using Arduino / Project Guidance / Re: Error while burning bootloader on: November 04, 2012, 12:06:04 am
Not because of that. I think I changed the fuse inside perhaps or maybe the setting ?
141  Using Arduino / Project Guidance / Re: Error while burning bootloader on: November 03, 2012, 07:50:27 am
Yes, have 6 pins adapter. Connected it correctly smiley
142  Using Arduino / Project Guidance / Re: Error while burning bootloader on: November 03, 2012, 07:10:28 am
the board is an arduino uno board ..It has 16mhz crystal on it. I dono how i change the configuration insude the atmega chip to what already ..how to fix it ?
143  Using Arduino / Project Guidance / Re: Atmega 8 development board on: November 03, 2012, 03:32:24 am
Okay, this gets a little 'fun'.
The 328 has different signature bytes than the 328P.
328   0x1E 0x95 0x14
328P 0x1E 0x95 0x0F

The real way around this (doing this from memory, bear with me).

Download a copy of notepad++ so you have a good editor
http://notepad-plus-plus.org/

Find avrdude.conf.  Open it & find 'm328p'

Copy that whole section, call it 'm328' and change the signature bytes per above.
Change anything that ATMega328P to ATMega328.  (no P at the end)
Save that.

Find boards.txt

Find a section that says something like "traditional NG bootloader. "
The NG boards used '168s and internal crystal.

"The initial design of the Arduino LilyPad had a 10-pin ICSP header and used the internal clock on the ATmega168 rather than an external oscillator. The bootloader on the initial design is the traditional NG bootloader. "

So you want to set up like that.
Copy that section, put in your new new board name, and put in the '328 signature bytes and memory limits.

Burn the bootloader so the fuses are set for the internal crystal, and you should be able to load sketches after that.
I've not tried this personally for anything but '1284s witt crystals, but it should get you pretty close.

Come back and ask questions if you get stuck.

Okay, after some experiment, I understand what you want to do now. You are actually creating a new board file so that I do not need to always change the signature of the arduino UNO bootloader signature from 0F to 14 right ? You straight creating a new board name arduino UNO for atmega 328 where when I want to burn the bootloader, I choose this board and with the signature of 14 instead of 0F. Okay. But then once I upload the bootloader, I cant upload the code through USB though. The error shown as like below :
144  Using Arduino / Project Guidance / Re: Atmega 8 development board on: November 03, 2012, 03:07:48 am
You burn the bootloader to get the fuses set up.

You are not using a crystal? Then there is a change needed in the fuse selections.
I can research that some tomorrow night if someone else does not step in before then. I'm off to bed.

Code:
uno_noP.bootloader.low_fuses=0xff
uno_noP.bootloader.high_fuses=0xde
uno_noP.bootloader.extended_fuses=0x05

uno_noP.build.f_cpu=16000000L

After I burn the new bootloader, then I change the board back to arduino UNO then upload code ?
145  Using Arduino / Project Guidance / Error while burning bootloader on: November 03, 2012, 02:39:57 am
Hey guys, I do not know why I encounter this problem while burning bootloader to my atmega328 although I changed the signature in the avrdude file from 0F to 14.

Hope can help

Thank you
146  Using Arduino / Project Guidance / Re: Atmega 8 development board on: November 03, 2012, 02:34:58 am
How can I check for the fuse bits of my current atmega328 ?? Any software ? As you said, burning bootloader is just changing the fuse bits so that the USB can communicate with the atmega 328. So, if I burnt arduino UNO bootloader into the atmega 328, then if I erased the bootloader, will the fuse bits remain the same ?
147  Using Arduino / Project Guidance / Re: Atmega 8 development board on: November 03, 2012, 12:33:56 am
Error

What does this error means ?
148  Using Arduino / Project Guidance / Re: Atmega 8 development board on: November 03, 2012, 12:28:52 am
I am using the crystal 16MHz
149  Using Arduino / Project Guidance / Re: Atmega 8 development board on: November 03, 2012, 12:23:08 am
No, you don't need a bootloader.
Once you are set up for the '328 chip,
you select the new board type
Tools:Board
select your programmer
Tools:Programmer
then set the fuses
Tools: Burn Bootloader

and then overwrite the bootloaded
File:Upload Using Programmer.
if you said I do not need bootloader, then why burn bootloader into thee chip ?
150  Using Arduino / Project Guidance / Re: Atmega 8 development board on: November 03, 2012, 12:15:21 am
Error
Pages: 1 ... 8 9 [10] 11 12 ... 14