Maker Pro
Maker Pro

Serial communication problem.

CDRIVE

Hauling 10' pipe on a Trek Shift3
Constantine, your concern over your logic being inverted is misplaced. A logic 1 on from the RS232 TX is Negative which is bypassed by D1 and Q1's BE junction will be reversed biased. This will placed Q1 OFF. This produces +5V at Q1's Collector. This is a TTL logic 1.

So, as you can see your logic isn't inverted at all. ;)

Cheers,
Chris
upload_2017-7-24_12-36-36.png
 
Could you please take a look at my post #27 ?
so my scopings of the max232 output should not be +4V at idle state but actually +5V...
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
Could you please take a look at my post #27 ?
so my scopings of the max232 output should not be +4V at idle state but actually +5V...
That's a difference of 1/10th of a volt. It's still well above the minimum TTL spec to be recognized as a valid TTL logic 1.

Constantine, are you using a hardware RS232 port or a USB/RS232 converter? On second thought I just took a peek at this image that you posted and it certainly looks like a hardware RS232 port. Most converters output -5V to +5V.
https://www.electronicspoint.com/attachments/1-rs232-source-png.35099/

Chris
 
Could you please take a look at my post #27 ?
so my scopings of the max232 output should not be +4V at idle state but actually +5V...

Now I'm confused.
I thought all 4 images on #27 are measurements taken on the INPUT of the Max chip,aren't they?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
Constantine, I skimmed over the MAX3222/MAX3232/MAX3237/MAX3241 Datasheet and noted the following quote:
The MAX3222 features a 1μA shutdown mode
that reduces power consumption and extends battery
life in portable systems. Its receivers remain active in
shutdown mode, allowing external devices such as
modems to be monitored using only 1μA supply current.
Perhaps this is the chip you need?

Personally I would not feed true RS232 voltages/currents into an un-powered chip without knowing how those nodes will react while the chip is un-powered. RS232 sources enough current to drive multiple LEDs in parallel. One thing is obvious, as proven by your tests. That would be that (despite the RS232 current capabilities) those MAX RXD inputs present a very low impedance "when the chip is powered down". There really isn't any other logical explanation to your loading problem.

This discussion has addressed the old age of RS232 along with the fact that it has become as rare as Hen's teeth on newer PCs. This has forced those of us that still love it's simplicity to use USB/RS232 converters. I own a host of them. Nearly all of them contain the popular Prolific chip. A few months ago I added a few of these to my collection.
http://www.ebay.com/itm/USB-2-0-TO-...447983?hash=item3a88eeb32f:g:XloAAOxyUrZSr1oN

I really like this concept because the user and the chip never sees or has to deal with the high voltage and bipolarity of RS232. This is essentially TTL(USB) IN / TTL OUT. No pump charge caps are employed or needed.

These modules come in two flavors but I chose the Prolific PL-2303HX based module. The other one, (which I forgot the name) uses another manufacturer's chip, has a bad reputation when downloading their drivers. They intentionally brick the chip if it detects a Chinese clone.

Chris
 
Last edited:
You should have done. Things are getting a bit confused now, it seems.
Ok. I can short things out if you could spare a little time to make the corrections for me please.

If you can, please delete all posts from 68 and below...

I will Make a new thread about the USB to UART converter.

P.S.

Thank you all who wrote about the usb-uart converter and about the max232 chip.
I have got all the info i needed. The above posts where not for nothing !
 
Last edited:

CDRIVE

Hauling 10' pipe on a Trek Shift3
Dork, you said it has become a spaghetti bowl. Harald, you said things are getting a bit confused now, it seems. Your both being to kind. I'm going crazy! Anyone wanna come? :p

BTW, no arguments with the RS232 details in either of those posts.;)
Chris
 

Harald Kapp

Moderator
Moderator
I asked Constantine to open a new thread, then I will move posts #68++ there.
I hope this will sort out things a bit.
 
Constantine, your concern over your logic being inverted is misplaced. A logic 1 on from the RS232 TX is Negative which is bypassed by D1 and Q1's BE junction will be reversed biased. This will placed Q1 OFF. This produces +5V at Q1's Collector. This is a TTL logic 1.

So, as you can see your logic isn't inverted at all. ;)

Cheers,
Chris

Please take a look at what Chris told me a few years back: post #9

https://www.electronicspoint.com/threads/help-with-data-switch.259040/


"You'll need to process the RS-232 signal. The idle state for RS-232 data is negative, so you need a circuit that detects when it goes positive (data present) and generates a negative signal on the input to that circuit. You can do this with an NPN (e.g. 2N3904 or BC547B) connected as follows."


So logic level 1 is +15V not -15V as stated in the diagram of post#61
meaning that the rs232 idles at -15V while TTL level signal will idle at +5V.

It is not a big deal since the circuit works fine and my microcontrollers will understand 0Volts as logic 1 and 5volts as logic 0
:)
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
I'm not sure that that is a logical conclusion. I can "perceive" that 1V @ 1uA = 1GW but that doesn't make it so. :)

Chris
 
I do not understand the last post. Could you please explain it to me ?

The example says that 1V @ 1ua = 1gw... that is not correct because wattage is given by the type V * A = W

While on the other hand what a microcontroller understands as 1 and what as 0 is not exactly standard or given by certain math type.

like posted on post #46

The relationship between TTL voltage levels for logic levels of "zero" and "one" and RS232 voltage levels for idle (mark) <-3 V and high (space) >+3 V is what it is. So, yes, disregarding the magnitude of the TTL versus RS-232 signals, the polarity is inverted. So what? You process the TTL signals as you wish, usually with a Universal Asynchronous Receiver/Transmitter (UART) integrated circuit, so if a logic inverter stage is required, so be it.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
I'm not sure that that is a logical conclusion. I can "perceive" that 1V @ 1uA = 1GW but that doesn't make it so. :)

Chris

I do not understand the last post. Could you please explain it to me ?

The example says that 1V @ 1ua = 1gw... that is not correct because wattage is given by the type V * A = W

While on the other hand what a microcontroller understands as 1 and what as 0 is not exactly standard or given by certain math type.

like posted on post #46
I think I confused you by using "@" in that post. I wrote that as a partial statement and partial equation. As a statement "1 volt @ 1 microamp is just an alternate way of 'saying' "1V * 1uA" By the way, ......
1V * 1uA= 1uW not 1GW
But that was my point.

As for the rest of your "Logic State" vs Microcontroller statements are concerned.... You are confused or do not grasp Binary Logic.
In Binary 0 = Logic 0 and a Binary 1 = Logic 1. This relationship does not change with the device type. In fact are you aware that a Binary 0 is also equivalent to Boolean "False" and a Logic 1 equals a Boolean "True"?

What does change across logic families, is what voltage levels constitute a logic 0 & logic 1. While RS232 is not considered a logic family it does follow Binary constructs.

The bottom line is that regardless of your perception that RS232's -15V = logic 0 it doesn't. It's a logic 1. The term "Idle State" does not translate to meaning logic 0 in any logic family or any device, component, node or otherwise.

Chris
 
Binary 0 is also equivalent to Boolean "False" and a Logic 1 equals a Boolean "True"?
Yes.
The term "Idle State" does not translate to meaning logic 0 in any logic family or any device, component, node or otherwise.

Right.. here is where i am confused. So to transmit the word 0101 the rs232 waveform should look like this (without start-stop bits). Is that correct ?

Reading back through the posts i think i am getting the picture now. Like with telegraph key mentioned in post #46

P.S.

Sir chris you have to be a patient person. Others would have given up on me long before.

THANKYOU !
 

Attachments

  • logic levels.png
    logic levels.png
    6.1 KB · Views: 90

CDRIVE

Hauling 10' pipe on a Trek Shift3
Yes it represents....
Binary: 0101
Hexadecimal: 5
Decimal: 5

Binary is read from right to left, where the rightmost bit is the (LSD) least significant digit. Therefore the Binary value 1010 would translate to....
Binary: 1010
Hexadecimal: A
Decimal: 10

Sir chris you have to be a patient person. Others would have given up on me long before.

Constantine, I'm going to pin a copy of this to my refrigerator door for my wife to see. She may never stop laughing! :D

You're welcome,
Chris
 
Binary is read from right to left, where the rightmost bit is the (LSD) least significant digit.

Thats normal since on the Oscope picture the far right pulse is the first to have occured (on the timeline). Also i think its called LSB meaning less significant bit but Less significant digit is not wrong also.
 
Good day to you all friends !

The last few days i have been working on my picaxe project. I have designed a new PCB and descided to implement the circuit shown in post #61 for the Picaxe to receive rs232.

After i finished the board i started running tests to see if all are working correctly. I then noticed that the picaxe would "hang" when it tried to read RS232 input from the 2n2222.

It was then that this super tool called Oschilloscope came into play.
Reading the Collector of the 2n2222 i noticed increased fall time of the signal. I descided to change the 2n2222 with bc547 and i noticed significant improvement and that the picaxe now can read the signal.

Could it be that the bc547 is more suitable for 4800bps baud rate rather than the 2n2222 ?
 
Top