Make your own free website on Tripod.com
Home

Radio interfacing to the IBM-PC Serial Port

Devices which use serial cables for their communication are split into two categories. These are DCE (Data Communications Equipment) and DTE (Data Terminal Equipment.) Data Communications Equipment are devices such as your modem, TA adapter, plotter etc while Data Terminal Equipment is your Computer or Terminal.

The electrical specifications of the serial port is contained in the EIA (Electronics Industry Association) RS232C standard. It states many parameters such as -
1. A "Space" (logic 0) will be between +3 and +25 Volts.
2. A "Mark" (Logic 1) will be between -3 and -25 Volts.
3. The region between +3 and -3 volts is undefined.
4. An open circuit voltage should never exceed 25 volts. (In Reference to GND)
5. A short circuit current should not exceed 500mA. The driver should be able to handle this without damage. (Take note of this one!)

Serial Ports come in two "sizes", There are the D-Type 25 pin connector and the D-Type 9 pin connector both of which are male on the back of the PC, thus you will require a female connector on your device. Below is a table of pin connections for the 9 pin and 25 pin D-Type connectors.

The original IBM-PC's Serial Port had a total of 3 digital outputs and 3 digital inputs accessed via the processor's I/O space.

Serial Port Pin Connetion:




  25 Pin 9 Pin   9 Pin 25 Pin  
FG (Frame Ground) 1 - - - 1 FG
TxD (Transmit Data) 2 3 --> 2 3 RxD
RxD (Receive Data) 3 2 <-- 3 2 TxD
RTS (Request To Send) 4 7 --> 8 5 CTS
CTS (Clear To Send) 5 8 <-- 7 4 RTS
SG (Signal Ground) 7 5 - 5 7 SG
DSR (Data Set Ready) 6 6 <-- 4 20 DTR
DTR (Data Terminal Ready) 20 4 --> 6 6 DSR

Port address:
The most serial ports are located at a base address of o3F8, 02F8, or 03E8. To find the base address of a parallel port in Windows 95, open the "Control panel", then click on "System", "Device manager", "Ports", select an port, then click the "Resources" tab. The addresses of installed serial ports are also displayed in the CMOS setup screens that you can access when you boot your computer.

The following is typical.


       Port        
	1            03F8             
	2            02F8              
	3            03E8           


Visual Basic
examples

Visual Basic:
In Visual Basic you have to use a DLL to access the ports. SoftCircuits programmed a DLLs which allow you to use the Visual Basic 32-bit . You can download the DLLs at Win95io.DLL.
Although the program code to call the Inp and Out routines.

You can also download our examples Serial Port for Visual Basic 5.0: Serial.ZIP

Instructions to read and write to the port:

read instruction: Data = vbInp(Port)
write insruction: vbOut (Port), Data



Take a loock at sites Phase Locked Loops Programmer and WINScanner Software.




E-Mail: cbradio@wintransceiver.com