Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Multi Port RS232 Question

Status
Not open for further replies.

Dotnet

Member
Hello All

I have an application whereby I need to read the data from a RS232 port (telephone PBX) on two PC's. (but not necessarily at the same time)

I have a thought to achieve the above by 'clocking' the PBX data into a FIFO type buffer and have two pointers, which corresond to the two output ports, pointing to the last read address located in the RAM.

Could I have some which might be the best way to achieve this both in a hardware and software level - it's been quite a few years since I have used my electronic knowledge (remember Z80's!!!)

Are there multiport RS232 microcontrollers out there which could be used together some suitable, say, PC software to debug the code before programming.


Thanks in advance

MAtt
 
Why build a circuit? If you only need it on one PC or another use a simple DPDT switch, for the RX and TX lines. That's all RS232 needs, unless you're doing hardware handshaking.
 
Hi thanks for the reply,

I wish it was that simple I need to log the data from the PBX to two PC's without manual intervention - obviously.

The trouble is one PC is able to log the data n real time to a a SQL database while the second PC can only poll the data periodically hence the need for a data buffer.
I have already purchased a unit (from Blackbox) but the unit doesn't do as advertised.

Matt
 
So let me get this right?:

The PBX sends data out of it's serial port, as and when it becomes available, it doesn't need to wait for a request to send?.

Both PC's need to log ALL the data, one does it in real time, the other only periodically downloads a block of data.

Why not simply transfer the block of data from the SQL computer to the other one?, it's already been buffered in an SQL database, simply export it to the other PC.

Otherwise you need to build a buffering device, and it depends a LOT how big the buffer has to be, and how fast it all runs.

For an example, a PIC and external storage should be able to do it.

PIC receives data from PBX, passes it on to PC1, and stores it in some kind of memory. PC2 later sends a request to the PIC, and the PIC transfers all the data to PC2 and clears the memory buffer.
 
Along the lines of what Nigel's recommended, why not just have PC1 buffer the data, and send it back out the serial port on request - same thing you want the PIC to do. An inexpensive serial port card or usb to serial adapter would eliminate the need for any switches.

either way you're writing code - one project, code for a microcontroller, the other project, code for a desktop computer.
 
Thanks all for the input,


Yes! the last couple of posts is exactly want I want to do but I'm not 'up' on modern component specifications to be able to choose correctly - hence my quesion.

Background info - I support(ed) a hotels SBS Premium system now this hotel has split into two operations and Inoe support both copanies, a hotel and a timeshare complex with a separate management structure.

Because it was once one business all the infastructure is common ie telephone system. Now both parties have their own front of house systems one based on SQL (persvasiv) and one based on Delphi (DOS). Both pieces of software have their own routines to access the PBX which I have no access

I believe the actual data word from the PBX is only about 30 bytes long my initial thoghts is to base a system on subroutine stacks and additionally if I'm going to the trouble of this I may as well incorporate a good size buffer incase a one or both PC's are down

There you have it - any pointers???

MAtt
 
Last edited:
A BASIC STAMP is just a low spec, slow, PIC that runs a BASIC interpreter - far easier just to use a normal PIC - it's easy to create as many serial ports as you need in software, and many PIC's have one in hardware.
 
For plenty of PIC serial port routines/info there is a section on the piclist web site:


and there is a page there that shows how to receive data on 8 channels:

(You should be able to modify it to use a 16F628 for the old 16f84 without too much trouble.)
 
hi dotnet,
Perhaps I'm stating the obvious, but you do realise that a TXD output
line will easily drive 2 or 3 PC's RXD lines at the same time without
any problems.

If I read your requirement correctly, just make a 'Y' cable configuration with
the output of PIC's MAX232 [or equivalent] TXD line, to the two RXD input
lines of your PC's.
You will of course require the 0v/commons.

Do NOT join two TXD's together.

Regards
EricG
 
Again thanks for the replies

I cannot use SQL to buffer the data because

a) I dont know how
b) also, it is a third parties responsibility to maintain the SQL database (me no touch!!)
c) if errand data or other probs occur it is a companies business which suffers and up goes my insurance premiums
d) lastly, the motherboard has no spare slots available to add extra cards. I only have the onboard ports availabe to use (currently the PBX and an exernal modem for server based faxing)
e) as a personnal preferance and bad experiences I don't like the USB media converter type units especially on a server.
f) as stated I might aswell use this unit to buffer the output should the receiving PCs have a problem.


I also realised in my original post that I made a mistake in my logic - I was thinking about 'ports' in terms of parallel data not serial data hence my question. My original thought was to use a UART, MAX232 and static RAM to achieve the desired results - then remembered about PICS (I did say I was rusty)

Lastly, Nigel the port on the PBX (GDK 186) was originally designed to feed a serial printer so there has to be someform of handshaking going on ( I was told differently) also I have since found out there is a buffer onboard the PBX which can get filled up and errors the system when data hasn't been read from the port for a while
 
Hi,
I write a lot of interface to PBX systems. (What PBX is it? Mital, Lucent, Nec)

All you have to do is create a PC program that reads from one port on the PC to the PBX and transfer it to the PC on the othe port. The flow will go the other way to. When the data comes thru your program save it. Then have a 3rd port on that PC that the other PC is on. When it ask for the data send the stored data to it.

Problem solved.

I have done this a lot. I work with Hotels that are part Condos and part rooms(hotel).

I hope this helps you.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top