Pages: [1]   Go Down
Author Topic: HOW TO BURN BOOTLOADER ON ARDUINO SERIAL BOARD.  (Read 1476 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey mates, i am a beginner and have just built my serial port based arduino on breadboard. Now i am finding a problem with my arduino. I have attachd db9 serial female port connecting RX & TX PINS. Connected a 2.1mm power adapter pin for input voltage. THUS, with this basic arrangement i began to connect female serial to male port of my pc and provided 4.8v input with adapter. i started off my pc and during welcome screen the green LEd glow or blinked 2 times. after this moment the led never blinked. i attached 9v,12v adapter but it didnt showed me any signs of life. I'VE used ATMega168 40pin microcontroller. Now i wish to know, 1.Does ATmega168 with 40pin work with arduino? 2.How can i burn bootloader without FTDI. 3.Is there any serial programmer? THANK YOU.
Logged

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

I hope there is a level translator between the DB9 and the cpu? Unmodified RS232 from the PC will probably fry the chip.

What did you do with the 9..12V adaptor? The chip can handle 6V max..

Personally I would use a FTDI usb-232ttl cable. In bitbang mode you can even program the bootloader in the chip, and levels are no issue.
Logged

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

Well, it seems I've already done the work of frying!
Now I'll try to move to Duemilanove. And possibly use FTDI. Way before it, I would like to ask, Can i prepare Duemilanov without SMD?
Also, can i get FTDI chip in DIP? Or else can I mount the SMD package on some smd holder? With Ftdi can i burn bootloader directly or maybe with some hack that wont require any external programmer like Avr MKII OR Etc. ?
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5581
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I understand that you are a beginner - but did you even look at the DB9 serial port version of the Arduino schematic - you would've seen a few components sitting between it and the ATMega (which act as a simple buffer/level translation)?

Also - did you not review voltage levels of the ATMega for the RX/TX pins and the voltage levels of standard RS-232?

I only ask this because ultimately, as a beginner, it is important that you do "RTFM" - when it comes to electronics and electrical work; research everything, review what you are going to do, and check it again before you do it; its that whole "measure twice, cut once" philosophy.

Doing this in the future will save you time, money, and potentially your life. Don't disregard this advice, please!

 smiley

Regarding the question of the FTDI chipset; I am not sure if a thru-hole version is available, but I doubt it. You can, instead, solder the needed pins to a header (check out an RBBB - Really Bare Bones Board - schematic), and then use an FTDI cable instead, to get around the need to solder the SMT chip.

There's also breakout boards like this one from SparkFun:

http://www.sparkfun.com/commerce/product_info.php?products_id=718

Good luck with your future experimentation!

 smiley-grin
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does ATmega168 with 40pin work with arduino?


I wasn't aware the the ATmega168 was avalible in a 40 pin package, at least Digikey doesn't list it?

http://search.digikey.com/scripts/DkSearch/dksus.dll?lang=EN&site=US&keywords=ATmega168

Lefty
Logged

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

@Cr0sh
Thank YOU very much for your kind advice. I respesct your words. Well I had seen that there was SCR kind of arrangement between ATmega and DB9 with pnp-npn transistors, and few resistors and diodes. So i thought there was no need of buffers between CPU and DB9. I read about voltage limit for ATMega that were around 12V max. I guess I mìght have gone wrong over there, considering as RX TX Voltage. In fact i didnt applied voltage to serial port. I wholeLY POWERED up the arduino.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5581
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Anurag:

Those transistors, resistors, and diodes were the buffer; I have heard (and probably seen at one point) of a way to use a 7404 in a similar manner. Something you might want to look into.

According to the datasheet:

http://www.atmel.com/dyn/resources/prod_documents/doc8025.pdf

The voltage limit on the ATMega168/328 is a little above 5 volts - not sure where you are getting the idea of 12 volts; unless you mean via the external voltage regulator (then 12 volts is true).

However, the voltage regulator drops that down to the 5 volts needed by the chip; that means that none of the i/o pins (including rx/tx) can be above this level of 5 volts. Standard RS-232 from a PC (and this isn't always true on modern PCs, btw) is +/- 12V.

Now - if you ran 12V directly into the ATMega VCC pin (pin 7 on the DIP package) - then that's how you fried it. If you were running 12 volts into the external regulator, I am not sure how you fried it, unless the 12V source you were using wasn't really 12 volts (some marked as 12VDC may actually produce voltage above this level). You may have fried the regulator, not necessarily the ATMega cpu (that's not a guarantee, though!)...

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

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

Yeah i applied the voltage to voltage regulator via adapter. I think i havent fried the atmega. Frankly speaking i have no idea whether the mcu got burnt. Now i need to work and find out the methods of starting  my arduino.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5581
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you can remove the traces or such between the ATMega and the regulator circuitry (this may or may not be necessary - try it without, first), then you can get a 7805 regulator, hook it up and feed the output into the VCC pin on the header; hook VSS to ground on the regulator, and hook up a 9V battery or something to the regulator; if the ATMega isn't fried, it should power up (actually, now that I think about it, does it power up when attached to USB - I think that bypasses the regulator too)...?
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

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

My arduino is built on breadboard/projectboard. So unmounting 7805 wont be a big problem. Also i checked the power adapter it was dlink 9v. I only have two external pins, one is serial rs232 whose pin #2 and 3 are for rx /tx and 5th pin is grounded. The second one is power adapter pin. What i wish to know now is, how can i know whether my arduino is working? I havent programmed the bootloader in my atmega168.  so how can i start my programing from bootloader to normal program.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5581
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh - I guess I was confused... smiley-grin

As long as you have the crystal/resonator hooked up properly, you could build a parallel port to ISP adaptor to "burn" the bootloader; alternatively, you could just buy a real Arduino, and use it to burn the bootloader (there's a couple of methods, one involves bit-banging with the FTDI chip outputs, another uses a sketch you load on a bootloaded ATMega in the Arduino, and then it can act as an ISP programmer - look around for AVRISP; under the examples menu in the IDE there's the ArduinoISP, I think that is part of it).

To be honest, this is all theoretical to me; I have yet to burn my own bootloader or anything myself, but it doesn't look like a difficult thing to do (provided, of course, that your chip isn't burnt out - it might be better to get a fresh chip and start over, burn the bootloader, be successful, then try your "fried" chip and see if it still works).

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

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

Cr0sh, I guess I'll get comfortable with the Arduino Hardware within this Week.
I got exams till Saturday and as soon as my exam gets over, I'll run to the market and get my FTDI Breakout board and one AtMega 168 or Atmega328.
This time I am pretty confident that I wont mess up much. I have tried building up two boards and to my knowledge of soldering and component handling was pretty right.
Today I am feeling much comfortable just because I found a cheaper breakout board for $8 only and it is available in my city itself.
Earlier I was thinking of removing Arduino outta my mind and getting with Sanguino. But, I need no much memory and power until i begin with real hardware. I was going mad after Serial just for the reason that it made the whole support simple in $1 itself.
I have some theory in my mind:
1) Build the arduino that only has I/O pins, ICSP, Power Input Battery/Adapter pin.
2) Program the Arduino with FTDI breakout board and bootload with FTDI Bit Bang (I don't know whether it'll be simple).
Hope my theory works!
smiley-grin
Logged

Pages: [1]   Go Up
Jump to: