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?
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
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?
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?
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);
}
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.