Computer Interfacing
Discussions about interfacing and electronics

rs232 and visual basic


       Computer Interfacing Forum Index -> RS232
Author Message

Jul 24, 2011 5:54 pm

can i make a device similar to that of the illustration
which could be controlled by a visual basic 5 application

so basically it would be an rs232 cable
Recommended Standard 232 9 pin connector
with 2 lights on it
and the vb application decides weather the lights are glowing or not

i have 2 LEDs and i can obtain other parts if necessary

so any way here is a picture of an rs232 9 pin connector

please tell me how i would wire it to the LEDs
1 - c
9 - d
if external components are needed please specify

i am new to this sort of thing but i really want to learn

and start making peripherals for computers useing rs232

please tell me how to wire this and once its wired
please tell me how to control it in vb
i know i am asking for a lot but i have no idea where to start please help me
Site Admin

Joined: 13 Mar 2007
Posts: 145
Location: Netherlands and Kazakhstan

Jul 27, 2011 3:56 am

You should be able to do this by wiring the LEDs between the signal ground (5) and the outputs of the DTR (4) and RTS (7) lines. These outputs toggle between a negative and positive voltage when they are set or unset. Maximum current is limited internally by the RS232 driver chip, which should be somewhere around 10 to 15 mA. That current is in the normal working range of LEDs, so additional resistors shouldn't be necessary.

I am not sure about the effect of a continuous negative current flowing through a LED, so you may want to add a reverse blocking diode like an 1N4148 in series with each LED to extend their life when they are logically switched off.

Jul 31, 2011 1:16 pm

thank you!
i shall have to try this

       Computer Interfacing Forum Index -> RS232
Page 1 of 1

Running on php BB © 2001, 2009 php BB Group
   Lammert Bies     Interfacing     Sitemap     Forum