[General] USB to RS232 CH340 communication problem

Status
Not open for further replies.

Shaheers

Member level 2
Joined
Mar 24, 2010
Messages
51
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Location
Islamabad,Pakistan
Visit site
Activity points
1,616
I am using USB to RS232 (CH340) cable to communicate with micro-controller

I tried both 89s51 and PIC 16f628A both controller working well when using in Proteus simulation but when i try i in hardware I receive unknow charactors ,

I am using asynchronous communication , can any body help how to communicate with that cable?
 

Are you using ONLY the CH340 IC or is it a complete cable assembly with a CH340 IC inside it?

If you are using a complete cable assembly, it will also have an RS232/V24 level shifter inside it. Do you have an RS232 interface device attached to your microcontroller (MAX232 etc) ?

Brian.
 

Its complete cable assembly
When i use this cable as a null modem eg connecting directly pin 2 to pin 3 it send and receive same character but
I also tried TUSB3410 complete cable assembly but its also not working as null modem i did not test with micro-controller, I test this cable to send some character it replay another character other then i send.
 

The cable assembly will be more than a CH340 which is just the USB side of the link, it will also contain an RS232 converter.

The microcontrollers do not use RS232, they use the voltage levels from which the device is powered, usually 3.3V or 5V. The signals from the micro are also inverted relative to RS232 levels. What you need is a MAX232 (5V) or MAX3232 (3.3V) which convert RS232 levels to TTL and back again. They also do the inverting and generate the RS232 voltages inside the IC so you do not need a negative power supply. RS232 nominally uses -12V for a logic '1' and +12V for a logic '0'.

Brian.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…