Usb To Serial Dengan Atmega8

Posted on

PL2303 USB to TTL, merupakan modul yang digunakan untuk komunikasi serial (USART) oleh mikrokontroller dengan komputer.

LOG: Made a correction/modification Step 3 and added a picture step 5. So many Arduino users have RBBBs(Really Bare Bones Board (Arduino)) or Anarduinos or Boarduinos that could use a USB interface to program and power them but don’t want to spend $15-20 for a USB BUB or FTDI cable. This Lazy Old Geek is one of them. Theory: Most Arduino clones are programmed with a PC using a USB port. Theoretically, they could be programmed with an RS232 port but it is really hard to find a PC with RS232. Some Arduino clones come with a USB converter but most do not.

Most require a TTL serial connection. TTL stands for Transistor-transistor-logic which basically means 0-5Vdc logic. So these Arduinos require a USB to TTL converter. One of the more common is the USB-BUB by Modern Devices: I own one and like it but they’re costly. So I saw these (see picture) USB to RS232 Serial DB9 Adapter cables on ebay for less than $2 so I bought one. Since I had three weeks to wait for it, I thought about and realized that it probably wouldn’t work as true RS232 has plus and minus 3-15 Vdc signals. The Arduino requires TTL levels which are 0 and 5 Vdc.

Nevertheless, I’d already bought it so I took it apart. It apparently had a PL2303 chip in it and I saw no level converters.

Anyway, I don’t have any kind of RS232 device to check it with but don’t see how it could ever work with a true RS232. But the other thing is; I couldn’t get it to work with an Arduino. If anyone has gotten one of these to work, please let me know how. Next I saw this article about converting a camera adapter to work with an Arduino. You might be able to get these adapters cheaper than the one I used. Following the guidelines it should work fine.

Step 1: My Arduino USB. I bought this PL2303 adapter on ebay.com. USB2.0 to RS232 TTL Converter Module PL2303 +4pcs cable But they can also be bought directly from Virtual Village for $2.99 plus $0.99 postage and handling. I’ve had good luck with Virtual Village.

Likes: Well made board, works with TTL. Fused LEDs for power, TX and Rx Dislikes: No schematic, operating instructions Uses a standard USB connector instead of a mini. Other parts needed: 2- 6 pin female headers Wire Optional parts for auto reset: 1 capacitor 0.1uFd (104) 1 male header pin Wire wrap wire or magnetic wire. Total cost should be less than $5. Step 2: Functional Test.

So let’s see if the adapter works. If you look at the picture, you’ll see a two pin jumper on the outer, lower two pins. There is no documentation but this appears to be a loopback jumper. It connects TX to RX so anything sent out is fed right back in so leave it on for now. Plug it into a USB port on your computer. You should here a kerchunk on your speaker and the red LED on the adapter should light up.

Now my Microsoft Vista machines automatically found the PL2303HX drivers but if you need to find them, they are here: Prolific is the company that makes the PL2303HX used by this adapter. (TW stands for Taiwan). Find the driver for your operating system and install it. I am assuming that you have Arduino software installed. Click on and select the correct COM number for the PL2303HX.

If you have several Com ports listed and don’t know which one then you need to go into Device Manager. For my PC with MS Vista, I do the following: Click on the little Start icon, lower left corner Right click on the icon Select Click on Click on Next to the icon, click on the The drop down should show or press at the same time. A serial monitor window should open up. Type something into the text box. The typed text should jump down into the second text box. That means the text is going out the TX pin, into the jumper and back into the RX pin. The adapter is working correctly.

Remove the jumper. Step 3: Decision Time: Auto Reset or Not. When you send a sketch to the Arduino, it will briefly pull a serial pin called DTR low which will reset the Arduino.

This can be done manually by pressing the Arduino reset button for a few seconds after sending the sketch. Timing this correctly is a little tricky but can be done successfully with some practice. Now this adapter doesn’t use the DTR pin, so it has to be modified to be able to use it. This requires some good soldering skills that you have to decide if you have. I was able to do it and I’m old.

But it wasn’t easy. If you want to skip the Auto Reset and do the Reset manually, skip the rest of this step.

Okay you have to solder a wire to one (and only one) pin on the PL2303 chip. The pins are 0.025 inches (0.65mm) apart. That’s not very much. A wire needs to be attached to pin 2 (DTRN). But it can easily be shorted to pin 1 or 3 so be careful.

Here’s what I did. My soldering iron had a plain copper tip. I sharpened it to a point.

I put a cutoff wheel in my drill press to do this. By the way, I did the same thing to my DMM probes. You can also do it with a file. Plug in the soldering iron and tin the tip. The wire I used is 30AWG wire wrap wire. I know others have used magnetic wire but I don’t have any or know where to get it cheaply. I happened to have some wire wrap wire but it can be purchased at Radio Shack or ebay.

Slightly irrelevant information:The little tool I have is a great way for stripping off insulation of wire wrap wire. You just slip it into the notch in the middle of the tool, pull it down into the V and pull the wire out.

Unfortunately, I priced these tools new and they’re about $25-$30. Okay, so using reading glasses, a magnifying glass and a bright lamp and a little solder, I was able to get it soldered. Note the little circle on the PL2303Hx chip that indicates pin 1 and that the wire is soldered to pin 2. If you have a DMM with sharpened probes, make sure that the wire is electrically connected to pin 2 and not to pin 1 or pin 3.

Next, I hot glued the wire to the adapter PCB. It actually covered up D3 the LED for TXD but it’s clear and the light shines through it. I hot glued a 0.1uFd capacitor (104) to the top of the PL2303HX chip and soldered the other end of the wire to one side of the cap. The other end of the cap goes to the Arduino reset pin but I decided to put it on a header pin so that I can make jumper cables for it.

I snipped off a single male header pin and soldered some wire wrap wire to the short side and clipped it short as much as I could. Then I stuck the single pin into a female header. Actually, I have some 50 pin headers but only needed six pins.

To trim this, what I do is go to the pin past the ones you need (in this case the seventh). Take a utility knife or Xacto and scored in the middle of where the pin runs. Do both sides a couple of times.

Then carefully bend the header until it breaks apart. You will have an extra metal contact to toss or recycle. On the adapter, there is a five pin strip of male pins labeled TTL. I put the female header on the strip so that the extra pin was just past the pin labeled 3.3V. Caution: Though the PCB is coated, the clipped off solder connection can be sharp and penetrate the coating. This happened to me on another of these so I had to stick a piece of tape under it to insulate it.

Now the insulation on this pin sticks up a little higher than the other five pins because of the wire and solder. But this is okay. The PCB is coated. Then I hot glued the DTR pin to the PCB. Then I soldered the other end of the wire wrap wire to the capacitor. See second drawing.

Step 4: Wiring It Up. Many Arduinos like the Anarduino, RBBB and Boarduino have a USB connector with six pins configured as Gnd, Gnd, 5V, Tx, Rx, DTR. So I decided to make a six pin female to six pin female adapter cable to go between my adapter and my Arduinos. TIP: I have a USB BUB and use it on Anarduinos and RBBBs.

They look quite differently and it is easy to put the USB BUB on opposite from what it should be. I have done this several times. I’ve been lucky that I haven’t had any apparent damage. To help prevent this I borrowed some nail polish and painted the DTR side red on both the USB BUB and the Arduinos. Now I just have to match the reds so that I don't put it on reversed. Notice that for the six pin female header in the picture, I cut a little notch out of one pin. This is so it will fit better on the DTR pin which is sticking up a little bit.

This will also identify which of the headers goes onto the adapter since they’re both six pin. I also plan to borrow a different color nail polish for this DTR pin. (see picture) Rules: NC means no connection Like pins connect to each other, e.g.

Anandam tamil serial episode 567. The patriarch of the family - Radhakrishnan (RK) is an eminent industrialist whose blissful existence is.

Tx to Tx My adapter header has the notch for the DTR pin. Decisions: If you decided not to use DTR then you connect the following: Adapter Arduino NC NC NC Rx Gnd Tx Rx 5V Tx NC 5V Gnd Just four wires. If you don’t need 5V from USB to power the Arduino, then skip the 5V also.

If you have DTR wired up then connect the following: Adapter Arduino DTR DTR NC Rx Gnd Tx Rx 5V Tx NC 5V Gnd.WARNING. The Anarduino has a ground connected to two pins of the serial male header strip. Apparently, so does the Boarduino. If you are using one of these, then the following cable won’t work and can easily damage the USB adapter chip. I modified my Anarduinos so that this will work. The RBBBs are okay.WARNING. Now, my cable will be a little different as I have RBBBs and I modified all of my Anarduinos so that they can accept 3.3V on the second ‘Ground’ pin.

This is a jumper option of the USB BUB. Since most of my sketches use 3.3V to set Aref, I will wire it up in my cable. Caution: If you do use this 3.3V be careful as it isn’t clear (to me anyway) how much current the chip can supply. The PL2303HX has a 5V to 3.3V converter in it, but this 3.3V is also the main power supply for the rest of the PL2303HX. In my designs, I use 3.3 for Aref. It is drawing less than 0.1 mA so shouldn’t be a problem.

Adapter Arduino DTR DTR 3.3V Rx Gnd Tx Rx 5V Tx 3.3V 5V Gnd For this cable, I made the wires 5” long. Note that I used heavy wire for the Ground and 5V and used wire wrap wire for the other signals. The 5V and Ground will need to carry a little more current.

Plus this adds a little strength to the cable. I wrapped some electrical tape on both headers as additional strain relief.

My adapter works great! One of the advantages of using a cable is that you can make several different ones. You might want a short one or in my case, I might want one without the 3.3V. If you make several, you might want to label them. Step 5: More Info and Conclusions. Level Translation: If you read the article about the other adapter I referenced, he talked about Level Translation.

He is basically correct. The signals coming out of this adapter are 3.3V and will work with Arduinos. For the one signal, Rx coming from the Arduino, I ‘reverse engineered’ the adapter circuitry. They have a resistor and diode in the circuit that will limit it to 4V. Plus the PL2303HX documentation does say that it is 5V tolerant. Plus on the adapter, the five pin connector says 'TTL' which means 0-5V. For all of these reasons, I didn’t feel the need for a voltage divider.

For all of you electronic circuitry geeks: If you look at the schematic for the Anarduino, Boarduino and RBBB, the DTR (sometimes identified as RTS pin) going to the USB connector has a 0.1uFd capacitor before it’s connected to the Reset pin on the AtMega. And further perusal of the USB-BUB schematic and my adapter shows another 0.1uFd capacitor from the DTR pin of the converter IC to the connector. So there are actually two 0.1uFd capacitors in series. So what does that mean? Well, many of you know that if you connect two resistors in series, the resistances add. Two capacitors in series are different.

The actual formula to find the capacitance is C1.C2/(C1+C2). So the equivalent capacitance is 0.05uFd.

So other geeks may be wondering what is a capacitor doing in the middle of digital circuitry? Here is basically what happens. When the USB is ready to operate, it sets DTR low. This low signal is passed through the capacitors and pulls the Reset. pin on the AtMega low for a short period of time.

This resets the AtMega. The capacitors will start to charge up so the AtMega side will go back to 5V and the AtMega will resume operation. Caution: I noticed that the PL2303 adapter that I received is slight different from the adapter in the picture from Virtual Village.

I hope that mine is the current version and that they are no longer selling the other version. But if you do get one of these and it’s different you may have to wire it differently. This adapter also comes with four piece cable. If you are not using auto reset and/or have extras, you can use these instead of making a cable like I did. There are several other versions of PL2303 adapters. Some of them have the DTR pin connected so that you wouldn't have to do the modification I did.

However, the one I saw was a lot more expensive. Conclusion: Well, I hope this helps some of you save some money. The last picture is an adapter cable I finished with something called cable lacing.

This was done with some waxed dental floss that I got as a sample from my dentist. I don't really have the a very good technique so won't go into details but if your interested, just do a search on 'cable lacing.' I'm not sure what happened but most likely you shorted pin 2 with another pin with solder.

Usb to serial dengan atmega8 download

I have a really hard time doing this modification any more. What I've been doing is taking an exacto knife and while heating pin 2 with a soldering iron, lifting the pin away from the pad. When it's sticking away away from the PL2303, it's a little easier to solder to without getting a solder short to other pins. Actually, right now, I stopped buying PL2303s and started buying and using CP2102s.

The ones I get already have DTR connected to a pin. Ok, here's the problem I see. Pins 10-13 of the Arduino are used as SPI, Serial Peripheral Interface, and this is what is used to communicate with the Attiny85. The Sparkfun product uses an Attiny84 to generate an SPI to communicate with the Attiny85. But the Arduino USB generates an RS232 connection. While this is also a serial connection, it is not the same as SPI. (For one thing, it does not have a clock line.

Another problem is that RS232 is asynchronous while SPI is synchronous) so I don't think the Arduino USB can be connected directly to an Attiny85 to program it. But I'm no expert on programming Attiny85s so there may be a way to do it. Yes, this is rather confusing. However, the DTR from the PL2303 doesn't connect directly to the RBBB Arduino reset pin. It connects to a capacitor that is connected to the reset pin. On the RBBB PC board, this connector pin is not identified.

On the RBBB schematic that I have, it is identified as RTS#. But you are correct.

Usb To Serial Dengan Atmega8 Adapter

There is no DTR pin or signal on the RBBB. But I wouldn't call it the reset signal either. Maybe it should be called C4? (By the way, I believe in the past, the serial RTS signal was used to reset the Arduino instead of the DTR signal. That is why the RBBB schematic identifies it as RTS.) LOG. I never heard of FTDI Friend until now so I did some research. So my answer is 'I don't know.'

But I do have an opinion. It appears that this method requires some thing called the Arvdude bitbanger and what I have found is that this was written specifically for the FT232 chip which is not what my adapter uses. So you might try it anyway, but I would guess it's not going to work.

I wrote an Instructable for burning bootloader that is pretty cheap: I agree with you that the FTDI adapter is very expensive and I only have one, a USB-BUB. Suggestion: Unless you are an experienced microcomputer user, I would suggest you buy a complete kit, like a RBBB or at least a bootloaded Atmega328 and build a working Arduino clone. Here's one of mine: With a working Arduino-clone, it's a lot easier to get started. I'm struggling over here trying to understand what you mean when you say, 'So you might try it anyway, but I would guess it's not going to work' Can you please tell me what is not going to work when they try what? I'd like to try something similar to what is described in this article but if it isn't going to work then perhaps I am better off not doing it.

Anyhow thanks in advance for any light you can shed on this mystery. If it turns out to be what I think it is I have a guess why it may not work? As of now I'm not entirely sure what it is though.

I think I know, but I'd just like to be positive. Hello & good day to you Lazy Old Geek (love the nickname, lol x 2!!!) Befor i start with my question, A 'MAJOR' Thanks for making and sharing this instructable with us all, its an amazing piece of very-well-laid-out instructions that even an electronics learner like me can follow!!

Have already rated it 5 stars - Many thanks!!! Ive also acquired the same PL2303HX usb TTL converter from (very very low price so i ordered 3 just in case i mess this up!) Anyhoo, ive installed the driver for it and my windows 7 pro has accepted it perfectly but my system wont instal the RBBB which i bought 3 kits of direct from but cant get it installed on my pc because i have no driver for it.

This is what ive tried so far: - Driver from the Arduino.cc website (the driver that came with Arduino IDE) - FTDI Drivers? (i read somewhere that these were needed but not sure now?) - Google searched my brains-out for an RBBB Driver but still unable to find one after 2 weeks of searching? None of this worked (by manually selecting the driver to be updated by device-manager - update device properties etc) Please please please could you say where you found the driver for your RBBB Arduino clone recognised?!!!? I have 3 of these RBBB's all working and soldered together and the pilot light comes on as it should in the instructions of soldering these boards together but i do not have 'Arduino Uno' in my com ports in device manager, just an 'unknown device' (which is no doubt my 1st RBBB clone!) I really want to do this instructable as its the most-in-depth article online - EVER!!!! Many thanks once again for the push in the right direction and once again MAJOR thanks for publishing this truly amazing, well thought-out & extremely inspiring piece of ingenuity!!! Hey many thanks for the cable lacing tip as well, i totally forgot to say thanks for that one!!!

Yup, you guessed it, ive only just started messing around with arduino's and have soldered 2 of them so far, but everytime i try to upload the simple 'Blink' sketch from the arduino IDE i get this message in red: avrdude: stk500getsync: not in sync: resp=0x00 also apart from the red LED on the PL2303 being -on- constantly, there is another LED on the PCB, a Yellow LED but this doesn't switch on until i unplug my RBBB and there's no activity or change in the LED's as the IDE software tries to upload? Would you know whats causing the sketches to fail? I have been using instructions from to upload, the manual reset way but after i stumbled upon your instructable i thought i'd rather have the software reset instead as its much less messing about with trying to find out how many seconds to hold down the reset tactile switch on my RBBB!!! Plus i dont mind trying to solder a capacitor to the DTR pin on the PL2302 as i have two of these USB PCB's but they are so cheap it wont really matter if i screw it up! So as soon as i can just figure out why i cant get a simple Blink sketch to upload, then i'll be soldering the PL2303 PCB as per your great instructable!

I really just want to see the sketch upload just for peace of mind that everything works as its supposed to (as standard, lol) and then modify the PL2303 after! Please would you be able to say if you had the problem above?

Ive trawled through the arduino forums and modern-device forums and still dont have an answer for this - its driving me crazy as ive 2 RBBB's fully soldered and awaiting sketches but still having this problem!!! Please help if you can! Many thanks in advance again LOG!

The Atmega 328 and 168 do have the same pinouts. The only difference is internally, the 328 has more memory.

One of the early official Arduinos used the 168, then latter converted to the 328. Many clones like the RBBB started with the 168 and later replaced it with the 328 but didn't bother to redo their documentation. In most cases, you can either type as long as you select the correct one in the Arduino software.

And yes, you are correct that the PL2303 DTR connects to the RBBB DTR pin which connects to the reset on the Atmega328. Actually, my documentation calls it RTS but for this application, it works.

FYI, earlier in Arduino history, This was connected to the RTS to do the reset. I don't know if this still works. By the way, your smd soldering is great, Much better than mine. Let me know how it goes.

As you get into Arduinos, it's nice to have lots of spare parts. One of my PL2303 modules died and I did lose an Atmega328. By the way, I've had some problems with the header pins and female headers being intermittent.

I buy the cheapest I can find so that's probably a factor. But actually one of my problems was with an 'expensive' USB-BUB. LOG - Your a Saviour!!! Seriously, many thanks once again, ive done the same Cap-soldering hack on my 2nd PL2303 and thats also working like a charm! I used a 2-part plastic-weld glue to secure the DTR pin (i use this glue alot, lol) but have recently picked up a batch of clear potting resin that im going to encase the whole USB Module into (only because i accidently shorted a USB module in the past as it was lying on a wire-link i had forgot to send to the trash!

), just got to make sure not to fill the holes of the usb port and have it sticking out of the mould a little so it will still connect into a female USB Port! Yeah i share your advice, instructables arduino guides are much easier to digest than arduino.cc, if only they followed-suit, lol, & ive been studying Adafruit.com for a few weeks now and its full of great stuff too!

Quick silly question though, lol, can i connect multiple RBBB's to a single PL2303, or the more likely story, would every RBBB need its own PL2303 - hence having a different COMM port assignment??!!!?? Thanks again LOG - Your Legendary!