Pages: [1] 2 3   Go Down
Author Topic: Programming a 328  (Read 3214 times)
0 Members and 1 Guest are viewing this topic.
St. Louis
Offline Offline
Newbie
*
Karma: 0
Posts: 29
SIUE-ECE
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4084
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 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.
« Last Edit: March 12, 2012, 06:44:53 pm by Jack Christensen » Logged

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

St. Louis
Offline Offline
Newbie
*
Karma: 0
Posts: 29
SIUE-ECE
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4084
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

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

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

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2504
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: March 12, 2012, 10:39:07 pm by runaway_pancake » Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4084
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

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.

Logged

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

St. Louis
Offline Offline
Newbie
*
Karma: 0
Posts: 29
SIUE-ECE
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1601
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

St. Louis
Offline Offline
Newbie
*
Karma: 0
Posts: 29
SIUE-ECE
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1601
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1601
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Huh.  I guess you're right

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

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2504
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ─ http://blog.lincomatic.com/?p=10  ***
« Last Edit: March 24, 2012, 09:50:03 pm by runaway_pancake » Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4084
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

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 ─ http://blog.lincomatic.com/?p=10  ***

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

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

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