Maker Pro
Maker Pro

RS-232 Circuit

B

Blog the Haggis

Jan 1, 1970
0
Hello,

I was wondering if someone could point me in the right direction regarding
RS-232 communication protocols, specifically to do with whether I need to
synchronise the computer and the circuit sending the data. Also whether I
need to include any start and stop bits on the data packet etc.

What I'm trying to do:
I want to get 8 mercury switches setting the states of a parallel loading
shift register, then to send this byte to the serial port (through a
line-driver to get the +ve/-ve RS-232 voltage levels). I believe it will be
fairly easy to get the Comport flags to load the register and initiate
transmission, but I am unsure of whether I need to send a clock signal or
any extra bits aside from the data.

If someone could enlighten me I'd really appreciate it,

-Duncan
 
M

Mike Harding

Jan 1, 1970
0
Hello,

I was wondering if someone could point me in the right direction regarding
RS-232 communication protocols, specifically to do with whether I need to
synchronise the computer and the circuit sending the data. Also whether I
need to include any start and stop bits on the data packet etc.

No and yes.
What I'm trying to do:
I want to get 8 mercury switches setting the states of a parallel loading
shift register, then to send this byte to the serial port (through a
line-driver to get the +ve/-ve RS-232 voltage levels).

Personally I'd use a small micro - PIC maybe, with built
in UART - don't forget switch debounce - which may, or
may not, be an issue for you. Mercury doesn't have much
IIRC.
I believe it will be
fairly easy to get the Comport flags to load the register and initiate
transmission, but I am unsure of whether I need to send a clock signal or
any extra bits aside from the data.

If someone could enlighten me I'd really appreciate it,

RS232 is an asynchronous protocol (ie. no clock) although
the 25 way connector does have provision for a clock I
have never know it be used?

Do a Google on "RS232" - lots of good hits - no point
in us spending ages typing what is readily available.
Then ask again if you have detailed problems.

Mike Harding
 
R

Rod Speed

Jan 1, 1970
0
I was wondering if someone could point me in the right
direction regarding RS-232 communication protocols,
specifically to do with whether I need to synchronise
the computer and the circuit sending the data.

Not if you are using the asynch protocol. Thats the whole point of it.
Also whether I need to include any start
and stop bits on the data packet etc.

Yes, thats essential. Thats how it works
out the timing with the asynch protocol.
What I'm trying to do:
I want to get 8 mercury switches setting the states of a parallel
loading shift register, then to send this byte to the serial port
(through a line-driver to get the +ve/-ve RS-232 voltage levels).

Thats fine, tho you may find that a uart
alone is enough, no need for a shift register.

You'd be better off using a picaxe tho, much cheaper than a uart.
I believe it will be fairly easy to get the Comport
flags to load the register and initiate transmission,

Thats not how RS232 is done. The com port just
looks at the RX line, waiting for chars to arrive.
but I am unsure of whether I need to send a clock signal
Nope.

or any extra bits aside from the data.

You do need a start and stop bit.
If someone could enlighten me I'd really appreciate it,

You'd be better off starting with a picaxe.

http://www.picaxe.com.au/
 
B

Blog the Haggis

Jan 1, 1970
0
Mike Harding said:
No and yes.


Personally I'd use a small micro - PIC maybe, with built
in UART - don't forget switch debounce - which may, or
may not, be an issue for you. Mercury doesn't have much
IIRC.


RS232 is an asynchronous protocol (ie. no clock) although
the 25 way connector does have provision for a clock I
have never know it be used?

Do a Google on "RS232" - lots of good hits - no point
in us spending ages typing what is readily available.
Then ask again if you have detailed problems.

Mike Harding

Thanks for the info Mike. I have already done a Google search and I indeed
found tons of sites about RS-232. While they all contained a description of
what each pin does, none of them had a binary example of a serial
transmission. The only thing I really need to know is how does the
computer's UART distinguish between the start of one packet and the next, ie
the difference between data & start/stop bits...

-Duncan
 
R

Rod Speed

Jan 1, 1970
0
Some pathetic little gutless fuckwit desperately
cowering behind the entirely appropriate
just the pathetic excuse for a troll any 3 year old could leave for dead.
 
T

the swan

Jan 1, 1970
0
Blog said:
Hello,

I was wondering if someone could point me in the right direction regarding
RS-232 communication protocols, specifically to do with whether I need to
synchronise the computer and the circuit sending the data. Also whether I
need to include any start and stop bits on the data packet etc.

What I'm trying to do:
I want to get 8 mercury switches setting the states of a parallel loading
shift register, then to send this byte to the serial port (through a
line-driver to get the +ve/-ve RS-232 voltage levels). I believe it will be
fairly easy to get the Comport flags to load the register and initiate
transmission, but I am unsure of whether I need to send a clock signal or
any extra bits aside from the data.

If someone could enlighten me I'd really appreciate it,

-Duncan

You can always use one of the (old) pin-programmable UARTS (such as the
COM8017). Attach your inputs to the 8-bit data bus lines, set the pins
for the desired operation (start/stop/parity etc), add a crystal for the
baud rate you'd like and then trigger it as you've mentioned.

These devices contain the shift register, baud rate clock divider,
parity generator etc all in (usually) a 40-pin package.

I used one of these once to do an 8-input, 8-output remote I/O box via
RS232, using a poll command to read the inputs or set the outputs (I
think there were a few kits many years ago based on the General
Instruments devices as well).
 
M

Mark van der Eynden

Jan 1, 1970
0
Blog the Haggis said:
Hello,

I was wondering if someone could point me in the right direction regarding
RS-232 communication protocols, specifically to do with whether I need to
synchronise the computer and the circuit sending the data. Also whether I
need to include any start and stop bits on the data packet etc.

What I'm trying to do:
I want to get 8 mercury switches setting the states of a parallel loading
shift register, then to send this byte to the serial port (through a
line-driver to get the +ve/-ve RS-232 voltage levels). I believe it will be
fairly easy to get the Comport flags to load the register and initiate
transmission, but I am unsure of whether I need to send a clock signal or
any extra bits aside from the data.

If someone could enlighten me I'd really appreciate it,

-Duncan

You are right, it can be done with a shift register. There was a
circuit in ETI, in the '80s, I think, that used a shift register and a
555 to turn 8 bits into serial. The start and stop bits were hard
wired. Hmmmm. Try looking up the ETI 632 VDU, I seem to vaguely recall
it having a multiturn pot to get the baud rate right. There was two
types of keyboard, the first cost an arm and a leg, the second was
cheaper and used the shift register approach, maybe, it's a bit grey.

Cheers,

Mark, trying to remember too much ancient history.
 
B

Blog the Haggis

Jan 1, 1970
0
Mark van der Eynden said:
You are right, it can be done with a shift register. There was a
circuit in ETI, in the '80s, I think, that used a shift register and a
555 to turn 8 bits into serial. The start and stop bits were hard
wired. Hmmmm. Try looking up the ETI 632 VDU, I seem to vaguely recall
it having a multiturn pot to get the baud rate right. There was two
types of keyboard, the first cost an arm and a leg, the second was
cheaper and used the shift register approach, maybe, it's a bit grey.

Cheers,

Mark, trying to remember too much ancient history.

Hi Mark, yes that's the sort of thing that I'm trying to do. I think it will
be fairly easy to generate the stop bit, all I'll have to do is hard wire a
logic 1 to the serial input and by the time I've transmitted the 8 bits I
should have a register full of them.

At the moment I'm trying to think of some clever (and easy!) way of getting
the start bit. So far the only solution that comes to mind is to add a
flip-flop to the output of the register which I can load a 0 into. Not a
very satisfactory solution but it would work. Maybe I can get the DTR line
triggering the start bit...

-Duncan
 
R

Rod Speed

Jan 1, 1970
0
Blog the Haggis said:
Hi Mark, yes that's the sort of thing that I'm trying to do. I think it will
be fairly easy to generate the stop bit, all I'll have to do is hard wire a
logic 1 to the serial input and by the time I've transmitted the 8 bits I
should have a register full of them.
At the moment I'm trying to think of some clever
(and easy!) way of getting the start bit.

Same way, its just another bit that is always in the same state.

In other words you need a 10 bit shift
register, 1 start bit, 8 data bits, 1 stop bit.
So far the only solution that comes to mind is to add a
flip-flop to the output of the register which I can load a 0 into.

Thats another way of saying a shift register with more than 8 bits.
Not a very satisfactory solution

Nothing unsatisfactory about it. You just
need to clock it 10 times for the 10 bits.
but it would work. Maybe I can get the DTR line triggering the start bit...

Its more usual to have the device send out a
full char at a rate thats internally determined.

You should be using CTS if you want to have an initiate command.
 
F

Franc Zabkar

Jan 1, 1970
0
RS232 is an asynchronous protocol (ie. no clock) although
the 25 way connector does have provision for a clock I
have never know it be used?

I have some minor experience with synchronous short haul modems that
used the clock pins on the RS232 interface.


- Franc Zabkar
 
M

Mike Harding

Jan 1, 1970
0
Wrong. Its the standard covering both synch and asynch.


Funny that.


Corse its been used, for synch.

You didn't know that until Frank posted did you
Roddie :) Oh you do have a fragile ego.

Mike Harding
 
R

Rod Speed

Jan 1, 1970
0
You didn't know that until Frank posted did you Roddie :)

Wrong. As always. Even you should be able to use google
and see that I have commented on that long ago.

And used that mode too, with leased lines, back in the days when 300
and 1200 baud leased lines were the bleeding edge of technology too.

Reams of your puerile shit flushed where it belongs.
 
M

Mike Harding

Jan 1, 1970
0
Wrong. As always. Even you should be able to use google
and see that I have commented on that long ago.

And used that mode too, with leased lines, back in the days when 300
and 1200 baud leased lines were the bleeding edge of technology too.

Reams of your puerile shit flushed where it belongs.

And yet despite the fact that my post had been here for
2.5 days you waited until 27 minutes after Frank
posted before telling us how clever you are - again!

And you cut the bit about your fragile ego - you little
tinker.

Mike Harding

PS. 300 baud! You poofter! I was in this game when
we used automated Semaphore flags. We'd have been
in seventh heaven with 300 baud!
 
R

Rod Speed

Jan 1, 1970
0
And yet despite the fact that my post had been here for
2.5 days you waited until 27 minutes after Frank posted

I hadnt noticed that particular piece of drivel of yours
because I didnt read that drivel of yours carefully, fuckwit.

Reams of your puerile shit flushed where it belongs.
 
M

Mike Harding

Jan 1, 1970
0
I hadnt noticed that particular piece of drivel of yours
because I didnt read that drivel of yours carefully, fuckwit.

Reams of your puerile shit flushed where it belongs.

You can squirm all you want but the truth is plain to
see.

And you cut the bit about your fragile ego _again_!

Mike Harding
 
R

Rod Speed

Jan 1, 1970
0
Some pathetic excuse for a bullshit artist claiming to be
Mike Harding <[email protected]> desperately attempted
to bullshit its way out of its predicament when its nose was rubbed
in yet another of its terminally pig ignorant stupiditys in message
and fooled absolutely no one at all. As always.

Try harder, fuckwit. You might actually manage to fool someone, sometime.
 
M

Mike Harding

Jan 1, 1970
0
Some pathetic excuse for a bullshit artist claiming to be
Mike Harding <[email protected]> desperately attempted
to bullshit its way out of its predicament when its nose was rubbed
in yet another of its terminally pig ignorant stupiditys in message
and fooled absolutely no one at all. As always.

Try harder, fuckwit. You might actually manage to fool someone, sometime.

I'm just curious; how long will you go on with a thread
posting asinine drivel purely trying to have the last word?
It's very egocentric you know.

And stop cutting the bit about your fragile ego, is it
really that fragile?

Mike Harding
 
R

Rod Speed

Jan 1, 1970
0
Some pathetic excuse for a bullshit artist claiming to be
Mike Harding <[email protected]> desperately attempted
to bullshit its way out of its predicament when its nose was rubbed
in yet another of its terminally pig ignorant stupiditys in message
and fooled absolutely no one at all. As always.

Try harder, fuckwit. You might actually manage to fool someone, sometime.
 
R

Rod Speed

Jan 1, 1970
0
Some pathetic excuse for a bullshit artist claiming to be
Mike Harding <[email protected]> desperately attempted
to bullshit its way out of its predicament when its nose was rubbed
in yet another of its terminally pig ignorant stupiditys in message
and fooled absolutely no one at all. As always.

Try harder, fuckwit. You might actually manage to fool someone, sometime.
 
Top