Programming a 328

So I don't want to buy a whole arduino everytime i start a new project because I'm a broke college student (sorry i love supporting you guys but i can't.) I have read about and feel that i could comfortably program an attiny via arduino fairly successfully. Honestly i am chomping at the bit to try it. What i want to know is if i take the atmega328 dip out of the arduino set it up with a regulated voltage and oscillator and most of the other stuff to make it happy. Will it still behave like an arduino? If this would work it seems to me like the best alternative to investing in a PIC or AVR programmer and learning a whole new environment.

So short story i want to put an atmega 328 in the uno, program it, take it out, and build a circuit around it. Would that work or do i need to start looking into a PIC/avr programmer?

That abolutely works! An AVR programmer is not absolutely required, but for $20 or so, is a real handy thing to have (I use this one). You can burn bootloaders with it or program the chip directly with your sketch and skip the bootloader altogether. Another nice thing is an FTDI interface board (I use this one) which allows you to program a chip via a bootloader. Basically the FTDI board moves the USB-to-serial conversion off the microcontroller board. So it and the AVR programmer are one-time costs.

Thank you very much sir! I really appreciate the help.

You're quite welcome, I expanded the post above some, it was probably too terse.

JC,
TylerS was posting "328", which cost $1 or so less, but shouldn't the ICs be the 328P?
Their characteristics are (nearly) identical, but the 328P operates down to 3V while the 328 is pretty much a strictly 5V device.
But more than that, isn't there a "signature" bug-a-boo, where the programmer verifies the device and the responses of the 328P and 328(non-P) are different?

runaway_pancake:
JC,
TylerS was posting "328", which cost $1 or so less, but shouldn't the ICs be the 328P?
Their characteristics are (nearly) identical, but the 328P operates down to 3V while the 328 is pretty much a strictly 5V device.
But more than that, isn't there a "signature" bug-a-boo, where the programmer verifies the device and the responses of the 328P and 328(non-P) are different?

I assumed he was using "328" more generically but really meant 328P as he was talking about taking the chip out of an Arduino, etc. Maybe he can clarify...

The "P" means "pico" power, not literally but the P version consumes less power than the plain 328. I haven't studied the differences closely, but they don't seem to be that great, and are mostly in the "Max" ratings, the "Typical" specs are mostly the same between the two. This is also true of the power save modes. The 328P just seems to have tighter "Max" specs WRT current consumption, etc. Either part will run on as little as 1.8V.

Correct, the signature bytes are different, again I haven't paid close attention, not having used the plain 328s, but I think it can be worked around.

I was aware of the difference it was just an oversight on my part thanks for looking out for me i appreciate it. I think i'm going to buy some parts next pay check and experiment with this a little bit in the coming weeks. Thanks a lot for all the extra information. Terse or not i can appreciate a direct answer as it is head and shoulders above no answer at all.

Hi Tyler, you can also get USB to Serial conversion of a Nokia cable(DKU-5or something like this one common characteristic is Big frame at USB side) so may be you do not even need to buy a FTDi if one is lying around with no use they basically have a prolific pl-2303 chip.

Thanks for the suggestion but i don't know what your talking about. I certainly don't have nything by nokia laying around either.

Isn't the PL2303 made for RS-232? You need TTL-level serial for FTDI purposes.

The FTDi chip on the Duemilanove and others is also a 232 UART USB interfacing chip , the PL 2303 works in the same way.

Huh. I guess you're right, it does put out TTL levels. It requires a driver IC to support DB-9 style RS-232 +/-9v.

Huh. I guess you're right

Definitely this is a fact no guessing :slight_smile: , you can easily get tutorials on the web modifying a Nokia mobile interface cable to make usb to serial adapter. :wink:

Jack,
You mentioned using the USBtinyISP.
Is that only for burning bootloaders with or can it be used for programming a 328/P without a bootloader (via ICSP)?

*** Found an answer to my question ? How to Use the Arduino IDE with an External Programmer – Lincomatic's DIY Blog ***

runaway_pancake:
Jack,
You mentioned using the USBtinyISP.
Is that only for burning bootloaders with or can it be used for programming a 328/P without a bootloader (via ICSP)?

*** Found an answer to my question ? How to Use the Arduino IDE with an External Programmer – Lincomatic's DIY Blog ***

Yep, all of the above. Also for just manually using AVRDUDE to check or set fuses or whatever.

hi-

I have only used my Arduino Duemilanove 2009 dev board.. for almost my needs.

I use it to flash my blank ATmega328P chips...(set-up on a breadboard standalone style.. 2 caps & crystal)

I have also done the generic/DIY FTDI cable mentioned here.. (heres my old thread)

while I couldnt find a DTR/RESET pad on mine.. I manually pressed the reset button on my standalone/breadboard to reset it for uploading a sketch each time.. worked every time.

the cell phone data cable (DIY FTDI)... cost me like $3.00 or something..(ebay)

you can get it from dealexteme (free shipping but long shipping times) for about same price I think..

sometimes it just easier to pop out my 328P dip chip in the Arduino and use that to upload sketches on boards that may be custom or not breadboard or no reset switch..etc

I got the USBtinyISP kit. Built it.
It uploads "sketches" OK (Good),
but it won't burn the bootloader (Not Good)

Error while burning bootloader
avrdude: invalid byte value (null) specified for immediate mode
avrdude: write to file 'null' failed when trying to burn bootloader

It's a Nano, but it definitely has a 328P.

but it won't burn the bootloader (Not Good)

Are you using the JTAG mode to programme?

I'm using the ICSP/6-pin cable.

edited the Preferences.txt in Arduino IDE?
if not use "usbtinyisp" in it