SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
User avatar
By roach
#10390
I'm looking at hooking up a cp2103 breakout board to USART0 on an ATmega128. someone mentioned ina nother thread that the cp2103 runs at 3v logic levels on the RX/TX pins.

Where can I find the logic voltage of the MCU in the datasheet? (I searched the pdf for "TTL", "level", and whatnot, and can't find this. I know it's in there somewhere, but I must be blind). Also, anyone who's done this before, any tips or schematics would be appreciated.

thanks!

EDIT: I renamed this from "cp2103 question?", in case the word "help" gathers more attention :)
Last edited by roach on Sun Mar 05, 2006 4:20 pm, edited 1 time in total.
By Philba
#10396
look under DC characteristics in the Electrical characteristics section.

It looks like the Vih min is .6 * Vcc or 3V on a 5V supply. If you ran the avr a little low and the cp2103 a little high, you might be able to avoid a level shifter though, I'd probably just use a tiny logic chip or two. pretty small and cheap and you don't have to worry about power supply tolerence as much.
By powool
#10405
What is a good 3.3<->5V level shifter in a DIP?
User avatar
By roach
#10407
As usual, the information is in the datasheet (I'm blind). Looks like the datasheet for the cp2101 breakout board says that the cp2101 RX/TX pins are "5v tolerant", which I guess means I can run them directly to the controller. There is no datasheet available for the cp2103 breakout, but I have to believe they are similar enough...
By Philba
#10410
you have to look at inputs AND outputs. 5V tolerant means the 3V chip can take input above 3V (5V, duh...). But the output from the 3V chip may not be high enough to be seen as "high" by the 5V device

Look at 74HCTxxx logic which have TTL input levels - 2.4V iirc. The outputs are usually close to Vcc (or open collector and thus close to what ever voltage needed). National has a "tiny logic" line with several chips that use HCT style logic but one or two gates in a SOT style package (i.e. frickin' tiny). I don't recall the specific part number but posted it a while back. Be careful to look at the specs - Vih min is the key value.

Phil
User avatar
By roach
#10674
Philba wrote:yBut the output from the 3V chip may not be high enough to be seen as "high" by the 5V device... Be careful to look at the specs - Vih min is the key value.
Well, for the AtMega128, it looks like Vih min is 0.6*Vcc. This should give me exactly 3V. But before I think about that:

I have another problem now. When I try to test my cp2103 breakout board using HyperTerminal, I get nothing. I'm trying to set it up in loop-back mode (I tied RX to TX on the board), so anything I type in HyperTerminal should be echoed on the screen, right? Except, I don't get anything back when I type...

Is there something I'm missing?
By riden
#10684
roach wrote:When I try to test my cp2103 breakout board using HyperTerminal, I get nothing. I'm trying to set it up in loop-back mode (I tied RX to TX on the board), so anything I type in HyperTerminal should be echoed on the screen, right? Except, I don't get anything back when I type...
How timely. I just got around to connecting up my CP2103 breakout board (06/12/05 revision) this morning. I installed the SFE drivers and it looks like everthing installed properly. There is a SparK Usb Key device, and when I plug in the breakout board the CP2101 USB Composite driver appears with the SFE USB to RS232 Controller as Com10. However, I cannot open the port with HyperTerminal ("Unable to open Com10, Check your settings") or any other term program that I have, for that matter. I also went into the driver properties and changed the port to Com2 which was open, but to no avail.

My machine is running Windows XP Professional SP2 with current patches. I used system restore to put things back to pre-driver install state and tried the drivers on the Silicon Labs site (v4.28 ) with similar results. So I reverted back once more. I am open to any suggestions for getting this to work.
User avatar
By roach
#10686
I don't think I'm quite ready to say there's something wrong with the board. After all, it was pretty much a textbook install for the drivers. WinXP correctly detected the board, installed the correct drivers, and a new COM port is available (COM4). When I launch HyperTerminal, it connects without an error message, but nothing I type gets "looped back". I see nothing on the screen...
By riden
#10696
I observed the same thing in Hyperterminal too. Try pressing "Disconnect" and then "Connect". You will probably get the "Unable to Open..." message.

Everything looks like it should work, but it doesn't for some reason. I saw a post dated last September on forum for embedded processors describing the same situation using this breakout board. No solution was given, sadly. :(

However, I do agree that I don't think this is a hardware issue, there just isn't that much to go wrong. I'll have to try this on another machine on Monday and see if it works any better there.
User avatar
By roach
#10705
riden wrote:Try pressing "Disconnect" and then "Connect". You will probably get the "Unable to Open..." message.
I actually don't get any error message at all. HyperTerminal seems to have no problem. I think I'm just not diong the loopback properly. Can anyone tell me how to set up the cp2103 for loopback? I thought I just needed to tie RX to TX, but maybe there's something else I need to do?
By riden
#10738
I tried a different Windows XP SP2 machine today (a laptop instead of a desktop), and I'm getting the same results -- HyperTerminal reports that it is unable to connect to the CP2103 board. Screamer and another terminal program I have are also unable to talk to the card.

Looking at the Device Manager on my laptop, I see an entry under USB controllers for CP2101 USB Composite Device and an entry under Ports for SFE USB to RS232 Controller (COM4). Device Manager says everything is working okay, but no joy with a loopback.

Does anyone know why this isn't working?
User avatar
By roach
#10739
riden wrote:HyperTerminal reports that it is unable to connect to the CP2103 board.
I don't receive any errors from HyperTerminal. The bloody thing just isn't looping back...

Had an email convo with Nate today. If you have the invoice, and the defective item is in saleable condition, you can just return it (for test, exchange, or refund). I'm gonna try a couple more tests first, though...
By riden
#10745
roach wrote:
riden wrote:HyperTerminal reports that it is unable to connect to the CP2103 board.
If you have the invoice, and the defective item is in saleable condition, you can just return it...
That's good to know, but there is so little that could go wrong with the board. The LED lights up, the chip is communicating with the driver (at least to announce the id), and the device shows up in the Device Manager. This sounds like a driver issue, but I'm not sure how to proceed. Maybe I'll try it on a Win98 machine I have around the lab.
By riden
#11320
I sent my original CP2103 breakout board back to SparkFun, and received a replacement today. I plugged it in, installed the drivers, and everything is working as advertised!

Thanks!
User avatar
By roach
#11340
Yeah, I sent mine back too (by narcoleptic sub-orbital carrier pigeon), no word yet on whether Sparky received it yet, or when I can expect a replacement. It's only been two weeks, so they may not have received it yet...