Pages: [1]   Go Down
Author Topic: No serial data received with CP2102  (Read 3192 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I'm using a CP2102 based USB to UART to try and communicate from a breadboard arduino to my PC. I'm using 5v and GND just fine and connecting rx to tx and vice versa. The arduino powers up and works.
My sketch is just a test that blinks an LED and writes a line to serial.
So, arduino powers up and led blinks but I don't receive any data in serial monitor.

I've tried swapping rx and tx and tried on mac and PC but not receiving anything.

Has anyone got any advice? Both rx and tx pins seem to have a constant voltage while the sketch is running. Is that right?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27099
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

Is there a Reset line on the CP2102 module?  Do you have it connected to anything?
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.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The module is one of these:
http://www.ebay.co.uk/itm/1x-USB-2-0-TO-RS232-Converter-UART-TTL-Serial-CP2102-For-Arduino-UNO-ATMEGA-PIC-/320923619625?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item4ab889d129#ht_4144wt_967

There's a reset pin, not connected, and (according to the eBay page) a way of connecting so the auto reset works.

I've tried starting serial monitor first, then powering on the arduino and also the other way around...
Logged

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I too have a CP2102 uart interface to breadboard, there is a reset line but it does nothing, I wait till IDE says uploading the press reset on breadboard, it works.

My uart interface has a red pcb so not quite the same but i've found that i have to connect rx > rx & tx > tx to get it to work, i know thats not the norm but i think my uart may be labeled wrong.

another thing i've found it that if you plug anything into the TTL side of the uart the USB shuts down, and works again then the uart is removed and plugged back in, it might be a quirk with my netbook i dont know, so i always remove the usb before connecting to the breadboard

Thats how it is for my setup
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27099
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

Onthe CP2102 modules, what has been found to work is to cut the trace going to the Reset header pin, and connecting the header pin to the DTR pin from the chip instead,  allowing a low on the DTR to create a software-controlled reset during serial downloads. The DTR would connect thru a 0.1uF (100nF) cap on your board to the uC reset pin (which would have a 10K pullup to VCC).

Did you install the CP2102 drivers for your PC as well?
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.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yup, drivers installed on mac and pc. It recognises device is connected when it's plugged in.
The atmega has been programmed on a UNO and the chip swapped in so I don't really need the reset to work (to upload sketches anyway). Like I said, I've tried every combination on rx/tx.
Maybe I just have a faulty one...

Will attach an led to the rx and tx pins later to see if they flash with data. Is there any other troubleshooting I could do?
Logged

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Put a jumper between tx & rx on usbuart without arduino connected, open a terminal program, type and see if the letter are echo'd
« Last Edit: June 29, 2012, 02:54:33 pm by P18F4550 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good call. I put a jumper between the rx and tx of the uart and data is echoed as expected. So that appears to be working ok.

I've just put an LED going from pin 3 of the atmega (tx) to GND and it's constantly on. Doesn't appear to flicker when data is sent...
measured using a multimeter and it appears to be at a constant 5v.

Sketch is, in essence;

void setup() { 
  Serial.begin(9600); 
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(3, OUTPUT);     
}

void loop() {
  Serial.print("Hello");
  digitalWrite(3, HIGH);   // set the LED on
  delay(500);              // wait for a second
  digitalWrite(3, LOW);    // set the LED off
  delay(500);   
}


Any other ideas?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok, added a bit to the sketch:

while(Serial.available() > 0)
{
  digitalWrite(3, HIGH);   // set the LED on
  delay(50);              // wait for a second
  digitalWrite(3, LOW);    // set the LED off
  delay(50);              // wait for a second
}

to test the rx pin, and this works like a charm.

Swapped in a new atmega chip and still the same problem, no tx data.
Tested the connection with the diode test thing on the multimeter and the soldering is sound.
I'm stumped.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Solved it. It was a short.
Knew there would be a simple answer!
Thanks for everyones help
Logged

Pages: [1]   Go Up
Jump to: