Pages: [1]   Go Down
Author Topic: Reprogramming an ATmega328  (Read 7057 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I recently started to become interested in building circuits and I bought this simon game kit from sparkfun so that I could get started learning the basics.  After I got it together and it was functioning I decided that I would like to figure out how to reprogram the ATmega328 chip that came with the kit so that I can make the game work differently.  After spending some time trying to learn how to do that I have a few questions I was hoping someone here may be able to answer for me.

The board has a set of 6 unused contacts, 3 of which seem to be connected to nothing and the other 3 of which; the ground, tx and rx pins; are connected to pins 1-3 of the ATmega328 chip.  The shop page that I bought the kit from suggests that I should buy a male header to solder into that spot on the board, and an FTDI board that would allow me to connect a USB cable to the board so that I could reprogram it.

I looked at the FTDI board in their shop and I was thinking it might be worth just making my own circuit that would do the same thing, instead of paying for their board.  So my question is, does anybody know how to create a circuit that would allow me to reprogram an ATmega328 chip using the tx, rx, and ground connections that are already etched on the board?

I would like to make this circuit on a breadboard, with a female header that I could connect to the male header I would put onto the board I'm trying to reprogram.

If this isn't possible does anyone have any suggestions for how I could get started learning more on a budget?

I was also a bit unsure about how to know if I need to be using 3.3V or 5V.  5V is silkscreened onto one of the contacts on the board, but the schematic that is supplied by the site says that it is 3.3V.  I used a multimeter and everything seems to be running at 3.3V so I assume that I'm using a 3.3V board, but I'm confused about the 5V marking on the board.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26420
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know where you're at (put a location in your profile), but go here
http://yhst-27389313707334.stores.yahoo.net/arliandpropr.html
and get a FTDI basic for $13 and save your self a ton of software hassle.
(I have been following Nisthant Sood's attempts with a couple of Serial & Parallel port programmers, he has been struggling trying to get them to work).
You can then use this to program other standalone boards you make yourself, or Prominis, or Ardweenys, or RBBB, or ...
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Not USA
Offline Offline
Full Member
***
Karma: 1
Posts: 123
Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I program my self build arduino projects with a usb to RS232serial converter, plugged into a RS232serial to TTL converter. Both were cheap off ebay and much cheaper than a USB FTDI cable. Looks a bit hackish but I could always put it in an enclosure if I wanted.

http://cgi.ebay.co.uk/USB-to-RS232-Cable_W0QQitemZ180612161700QQcmdZViewItem?rvr_id=201959535446&rvr_id=201959535446&cguid=b2632f4b12d0a47a26f3ccf3ffe4de02

http://cgi.ebay.co.uk/MAX232-RS232-Serial-TTL-Converter-Board-PIC-Adapter-/320646346515?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item4aa802f713

Doing it this way has the added bonus of leaving me with a USB to RS232 converter should I ever need one as well. More flexibility for about 1/3 of the price of an FTDI cable? Why not.
« Last Edit: January 23, 2011, 05:23:31 am by electrocrook » Logged

3D Artist,Modeler, Texturer, Animator, Electronics and Robotics, Programming C, VB, Website Design, Flash animator

Too many hobbies?

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The main reason I'm hesitant to buy the arduino lilypad programmer is because there are two different versions of it.  One is 3.3v and the other is 5v.... maybe the one you linked me to handles both cases, but it looks exactly like the ones I was looking at.  I'm unsure how I would know whether I need the 3.3v or the 5v version and I don't know exactly what would happen if I used the wrong one.

Both versions can be switched to the other mode by cutting a lead and soldering a jumper or switch in place, but I still don't want to plug it in until I know which version I should be using.

Like I said, my board seems to be running at around 3.3v, so I'm sure that's the one I need, but I just thought I should ask for advice before buying anything.


If I were to instead go with the USB to RS232 converter as suggested above, how would I need to connect that to my board?  The board I am trying to reprogram can be seen here:

http://www.sparkfun.com/products/9883

It has pictures of the board and at the bottom there are schematics and eagle files.  There are 3 unused sections of the board, one is the set of 6 pins for the serial connection that I mentioned earlier.  Is this where I would need to somehow connect the RS232 stuff that you recommended?  If so the header wouldn't match with the board you recommended.

There is also an ISP section, and I have no idea what the purpose of that is, so if anyone could enlighten me that would be great.  It seems to match the pins on the RS232 board but I know that doesn't necessarily mean they go together.

The third unused section on the board, as far as I can gather, is just there for possible expansions of the board so that I could add new boards if I chose to do so.
« Last Edit: January 23, 2011, 05:27:16 pm by Yarui » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26420
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have used the FTDI Basic to program both 3.3V and 5V Prominis.
As long as you don't have any other circuitry hooked up (i.e. take out the battery) you should be able to program with it. At the worst, you make up a little cable to swap pins around if needed:

This one just extends the wires, move the wires on end to suit your needs (made with crimp connector housing & terminated wires from pololu.com)
There are 3 little pads on the back for passing VCC straight thru from the PC, or using 3.3 that is generated by the FTDI chip.
So you can order the 5V version and check to see if the little trace is cut and the 2 pads soldered to each other, or order the 3.3V version and the trace should be intact with no extra soldering added.  
« Last Edit: January 23, 2011, 08:32:31 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: