Reply
Posts: 5
Registered: ‎07-05-2017

CP2102 Interfacing with LPC1769

I am planning to use CP2109 ( USB to UART Bridge ) in my new design.

 

Schematics is as shown:

 

CP2109-TX and CP-2109-RX are micro controller UART pins (TXD and RXD respectively).

CP2109-RTS and CP2109-CTS are also micro controller pins.

Micro controller used is LPC1769.

 

My query is, TXD ( pin 26 ) and RXD ( pin 25 ) pins of CP2109 are RS232 pins or micro-controller UART pins?  If RS232 pins then I will need to use MAX 232 IC and assign RS232 level pins to TXD ( pin 26 ) and RXD ( pin 25 ) , please confirm.

 

As per design, TXD ( pin 26 ) is assigned to TXD pin of LPC1769 and RXD ( pin 25 ) is assigned to RXD pin of LPC1769.

 

 

cp2109.png

Posts: 2,108
Registered: ‎10-14-2014

Re: CP2102 Interfacing with LPC1769

that was UART interface of CP2109 and you need an external MAX 232 IC if you need different logic level.

Please check the datasheet of CP2109 and the EK board with below link:

http://www.silabs.com/products/development-tools/interface/cp2102ek-evaluation-kit

http://www.silabs.com/documents/public/data-sheets/CP2102-9.pdf

 

By the way, CP2109 is a very old bridge product and if you are starting a new project I suggest you could try CP2102N.

 

WeiguoLu
Posts: 5
Registered: ‎07-05-2017

Re: CP2102 Interfacing with LPC1769

If USB printer to be used in design, what mode should be used ? UART or RS232 ?

If UART level, then controller UART (RXD,TXD) pins to be mapped and if RS232 level then MAX232 IC to be used.

So please suggest for external USB printer, which mode to be used?

 

Thanks in advance.

 

Posts: 2,108
Registered: ‎10-14-2014

Re: CP2102 Interfacing with LPC1769

I checked the datasheet of  LPC1769

http://www.nxp.com/docs/en/data-sheet/LPC1769_68_67_66_65_64_63.pdf

According the table 8 on page 48 of the datasheet CP2102 could connect with LPC1769 directly.

 

WeiguoLu
Posts: 5
Registered: ‎07-05-2017

Re: CP2102 Interfacing with LPC1769

@delu

WeiguoLu
Thank you very much for your reply.
 
As I said earlier, our configuration is as shown and we are trying interface external USB printer. And not used MAX232.
 
Just want to be sure that it can work without MAX 232 IC as shown for USB printer.
 
cp2109.jpg
Highlighted
Posts: 3,021
Registered: ‎02-07-2002

Re: CP2102 Interfacing with LPC1769

A USB printer is a USB Device and the CP2109 is also a USB Device. Both need to be serviced by a USB Host which you do not have. This will never work, so stop and start to think of something different.

Posts: 5
Registered: ‎07-05-2017

Re: CP2102 Interfacing with LPC1769

Yes, Thanks I got it. One more query, Can we use above circuit  as Virtual COM without using MAX232 IC and directly connecting to microcontroller (LPC1769) TXD and RXD.

Posts: 2,108
Registered: ‎10-14-2014

Re: CP2102 Interfacing with LPC1769

As i said before, the LPC1769 and CP2102 both use TTL logic level (3.3V) and you could connect them together. RS232 use different voltage level and low as logic 1 (if I remember it correctly).

I don't know printer well, not sure if there are some printer could work as USB host (OTG support). I think you could double check if your printer could work as USB host. 

 

But my understanding is that the UART or RS232 mode is independent on the USB side. The CP2102 was enumerate as a virtual COM port and USB host don't care it was UART or RS232.

 

My views are my own and do not necessarily represent the views of Silicon Labs

WeiguoLu
Posts: 3,021
Registered: ‎02-07-2002

Re: CP2102 Interfacing with LPC1769

Whether the CP2109 and the LPC1769 use TTL levels or RS232 levels is something you should be able to find out by reading the datasheets. If you cannot I'm sorry to say that you are not ready for designing circuits for them.

 

And even if a USB printer supports USB OTG it is very unlikely that it contains a driver for the vendor specific implementation used in the CP2109. I very much doubt it would even know how to talk to a generic USB CDC and handle UART data. I suspect it will only support USB MSD and USB VDC.

Posts: 5
Registered: ‎07-05-2017

Re: CP2102 Interfacing with LPC1769

Everything is clear about USB printer, as you suggested that it will not happen. I am concerned only about Virtual COM port. I have seen Bafo cable which has USB port and RS232 signals which assigned to RS232 signals of MAX232. So I want to confirm whether I can connect it to microcontroller UART directly and can use as virtual COM port.