ATmega328p with 8MHz internal clock

Hello,
I trying to program the ATmega328p on a breadboard. I know there are some bugs in Arduino 1.0 and that you could just buy a crystal and caps for under $1, but I would like to use the minimal configuration on a breadboard with Arduino 1.0. The only components I would like to use are an ATmega328p and a reset button, and an Arduino for programming. So this would mean no USB interface, just ArduinoISP with another UNO. I am using a mac running OSX 10.7.3, but that shouldn't matter for any reasons. I have seen the "Arduino to Breadboard" tutorial on the Arduino site and downloaded the zip file, but this hasn't worked. Any help?

Thanks,
Qtechknow

Have you already burned a bootloader onto the chip with specific settings to use it's 8MHz internal clock? If not, try that first.

Have you bought that ATmega328 alone ? It's blank or it has some Bootloader in ? One way or another I believe that even if there is Bootloader on it, it will be one that requires 16 MHZ oscillator. So you need to change fuses on that chip and also burn there a corresponding Bootloader.

Thanks for the replies. I've tried to bootload the chip for the 8MHz internal clock, and had no success with ArduinoISP or USBtinyISP. It already has the optiboot on it, and in the boards.txt file that I have, it says somewhere that it changes the fuses. But it also says in the boards.txt file that it uses the Arduino pro mini 8MHz bootloader. Also I can't compile as the ATmega328p on a breadboard.

I assume that Optiboot Bootloader requires 16mhz oscillator to run, what error did you get after trying to burn the Bootloader ?

Arduino 1.0 has serial buffers that are small enough that they cause failures in the ArduinoISP sketch. You might be able to work around that problem by setting the baud rate lower in ArduinoISP and in programmers.txt.

If you get a factory fresh ATmega 328 chip you should be able to burn an 8MHz no-crystal bootloader into it. If you got a 328 with an Arduino bootloader on it you will need the crystal and capacitors to use a serial programmer on it (ISP won't work without a functioning processor clock). If you have a second Ardiuno with a removable 328 processor you can use that as a temporary host system to provide the crystal clock, program your chip to use the internal clock, THEN move the chip to a breadboard.

I get the error message "avrdude: stk500_getsync(): not in sync: resp=0x66" when I try ArduinoISP, and when I try USBtinyISP, I get the error message

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

Thanks for the replies. Oh, and thanks John Wasser for your idea. I will get a new ATmega328p soon.

Hey, i'm actually doing JUST what you're doing. There is a lovely instructional on the arduino website on breadboarding an arduino in minimal mode. It includes a txt file with the fuse settings and the other stuff that will get you a new option on your IDE to burn that appropriate bootloader.

It will all be in the last section. Report back with your testing as that is the last of several projects i have to do today and i ma not get it done, esp if i get a disappointing answer to my question.

As a side-note, why not invest in an AVRisp MkII programmer next time you have a few bucks knocking around? They're hardly expensive and might make easier work of re-bootloadering things. Been meaning to get one myself for just that purpose. It's good to know all the bodges and workarounds of course, but it's also good to have a nice stash of tools :smiley:

Why not just used the Uno board? That is a legit question seeking and answer as that was the main reason that i didn't get a new set of dev tools. :). Is it any slower to upload sketches?

Well EXCUSE ME :stuck_out_tongue: Maybe I'm the only one who gets tired having to hack and bodge every damn thing and actually WANTS the proper tool to hand once in a while :stuck_out_tongue:

That's BLASPHEMY!!!!
lol, i get what you're saying. I dunno, i guess i still am at that "If i can readily build it, why buy it?" phase.I'll wisen up one day...

Qtechknow...any luck with the website i sent you? I didn't even finish part one of what i had to do today yet :P.