SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By yetanothername
#126185
When I bought the components for my board, I mistakenly bought an ATmega328 instead of an ATmega328p. From what I can tell these two processors otherwise identical except the *p version is a low power one (and the one that's used in the Arduino). However, I can't find support for the non *p version in any tool I've come across except for a beta version of AVR Studio 5. AVR Studio 4 and avrdude only have support for the p version. AVR Studio 5's support for the 328 seems half-baked and it doesn't work with my programmer (The Pocket AVR Programmer).

Does anybody know the correct combination of hardware/tools/drivers/software that will enable me to program the ATmega328. At this point I don't really care what language it's in, I just want to get this thing to work :(

Thanks.

PS: I'm on Windows 7 x64.
PPS: I also ordered a 5V blue-on-white LED screen from SparkFun, and the bottom row's backlight is a cooler white than the top row. Is it supposed to be like this or did I get defective unit?
By yetanothername
#126191
I can't seem to find the 328 in this list of supported devices:

Image

Edit: I'd settle for using avrdude but it has a section for only the 328p and not the 328. I can force avrdude (using -F) to program my board pretending to be a 328p but when I upload a .hex file I made using the Arduino IDE, it's successful in programming the device but nothing happens. So I don't know if it's silently failing while pretending to be OK or if my code's wrong.
User avatar
By leon_heller
#126192
You have the simulator selected, they are the same device as far as that is concerned. Try selecting the Dragon.
By yetanothername
#126195
The 328 is also missing from the Dragon's listing, and this one:

Image

However when I hit "Read Signature", it reads the correct signature for a 328, "0x1E9514" I followed some instructions to trick avrdude into thinking that a P is a non-P and it doesn't error out at all.

Like I said before, I honestly don't know if it's the programmer or my code. Tomorrow I'm going to hock up an oscilloscope to some pins to see what's going on.
User avatar
By leon_heller
#126202
Both are present with my version of AVR Studio. You seem to be using an old version.

I'd dump that programmer and get a proper Atmel one. It might cost a bit more, but you'll have fewer problems.
By yetanothername
#126245
Thanks. I was using the RTM version of AVR Studio 4 and when I installed SP3, ATmega328 showed up. So that's one less kludge I have to use. Now onto why my code isn't doing anything. Onto the oscilloscope!

Edit: After soldering on some LED's, my toolchain works! Thanks leon_heller! Now onto why my display isn't working.
By MrPerfectionest
#126315
Not to thread hijack but my question is related. Is there a platform that ISN'T arduino that I can program over usb AND be able to use the same connection as a com port to send data back over rs232 from the device? I realize this is all built right into arduino (well, via the bootloader setup) and I may end up just getting one but I already have an STK500 from many years ago and I'd rather just connect up to the ISP header or have the flexibility to program and communicate outside of the arduino platform.

I looked around but nothing jumped out at me immediately as a tool that can do both.