electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Simple questions on RS232 interfacing


Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> Simple questions on RS232 interfacing
Author Message
smartsarath2003



Joined: 12 Feb 2004
Posts: 76
Helped: 2


Post28 Mar 2005 2:12   

rs232io.exe


Hai,

I am a new guy to serial port protocols. I want to connect an LED to a serial port and want to switch it ON when a specific/any key press occurs on key board.

If I start hyper terminal and start new connection with my serial com port, Can i observe any data on Transmitt (pin-3) of RS232 when any key is pressed Question .

I actually tried to send a txt file with a single char. But after a long time, hyper terminal comes up with message remote device not found message. As I actually don't want to communicate with any device and i don't mind sending some rubbish.
But my idea is to send oxff to switch on led and 0x00 to switch off.

can anyone please explain me the above points... Rolling Eyes

Thanks
Back to top
Google
AdSense
Google Adsense




Post28 Mar 2005 2:12   

Ads




Back to top
kasd



Joined: 11 Nov 2004
Posts: 40
Helped: 3
Location: Singapore


Post28 Mar 2005 2:18   

serial port relay


Try to use "no flow control" and check your connection to the serial output and input are pull up.
Back to top
smartsarath2003



Joined: 12 Feb 2004
Posts: 76
Helped: 2


Post28 Mar 2005 20:10   

using rs232 dtr to drive a relay


Hai,
Iam not sure how to enable "no flow control" from Hyperterminal. Also I didn't have anything/any pull ups conncted to serial port.
Iam just trying to send some char out through rs232 and want to check the data pin with scope. I just want to know weather it is possible to use serial port like that.

The application I am trying to use was some thing like the attached ckt. In that parallel port was used to drive the relay and I want to replace that with a serial port. With parallel port , i just need to make the corresponding data pin high. But looks lil confusing with serial port.
Any help?

Thanks



Sorry, but you need login in to view this attachment

Back to top
jshroff



Joined: 30 Apr 2004
Posts: 116
Helped: 14


Post28 Mar 2005 20:59   

Re: Simple questions on RS232 interfacing


smartsarath2003 wrote:
Hai,
Iam not sure how to enable "no flow control" from Hyperterminal. Also I didn't have anything/any pull ups conncted to serial port.
Iam just trying to send some char out through rs232 and want to check the data pin with scope. I just want to know weather it is possible to use serial port like that.

The application I am trying to use was some thing like the attached ckt. In that parallel port was used to drive the relay and I want to replace that with a serial port. With parallel port , i just need to make the corresponding data pin high. But looks lil confusing with serial port.
Any help?

Thanks


You need to do low level serial port IO. You cannot just send data as after the data is sent the led will turn off. Instead use the DTR or RTS pin and set it high or low using the EscapeCommFunction call in windows api.

See http://www.connecttech.com/KnowledgeDatabase/kdb229.htm for function details.
Back to top
kasd



Joined: 11 Nov 2004
Posts: 40
Helped: 3
Location: Singapore


Post29 Mar 2005 2:20   

Re: Simple questions on RS232 interfacing


yes, you should connect that signal (input to your relay) to the DTR or RTS (which are also outputs). Serial transmit may not be good since there will be some ON/OFF state in the sending of a byte.

Another point to note is the voltage level of the serial output may 9V. Check out beyond logic for more information.

http://www.beyondlogic.org/serial/serial1.htm#40
Back to top
gelidude



Joined: 14 Apr 2007
Posts: 24
Helped: 3
Location: Philippines


Post04 May 2007 5:20   

Simple questions on RS232 interfacing


the serial port is actually controlled by a USART chip or equivalent SuperIO chipset in the motherboard. the chip needs to be programmed first like the data byte to send, the baud rate, etc. truth is, you cannot program the TX pin to stay in single state. what happens is that you first load the data into one of the USART's registers and then trigger the USART to send the data at the specified baud rate. for more info, read the link given by kasd to learn more about the serial port. just hit me for any questions and i'll try to answer them. enjoy with your experiments!
Back to top
nomad13



Joined: 29 Jan 2007
Posts: 154
Helped: 12


Post04 May 2007 6:03   

Re: Simple questions on RS232 interfacing


To control devices thru rs232 I suggest you use a microcontroller to interpret the data that you are sending specially if you intend to control more that one device.

Simple questions on RS232 interfacing
Back to top
turbina



Joined: 10 Jun 2007
Posts: 54
Location: North Italy (Udine)


Post15 Jun 2007 12:24   

Simple questions on RS232 interfacing


you can use as already sayd DTR or RTS ( outputs), at ouput pin you can use a low current led with a series resistor 3k3ohm because current must be lower 2milliamperes/pin to be able with desktop and notebook.
Back to top
tareksamy



Joined: 01 May 2007
Posts: 7


Post16 Jun 2007 13:37   

Simple questions on RS232 interfacing


Simple questions on RS232 interfacing
Back to top
Mr.Control



Joined: 02 May 2007
Posts: 11
Helped: 1


Post19 Jun 2007 18:11   

Re: Simple questions on RS232 interfacing


you can do it with 2 way which serial and parallel that "smartsarath2003" he had explained or you can do it with DTR RTS to direct drive relay
more Serial port information refer thus as link below
http://www.thaiio.com/serialportinfo.html
Back to top
turbina



Joined: 10 Jun 2007
Posts: 54
Location: North Italy (Udine)


Post20 Jun 2007 11:11   

Re: Simple questions on RS232 interfacing


you can see an example with vb6 source code and DLL used to drive pins of serial port.


Sorry, but you need login in to view this attachment

Back to top
ultrabrains



Joined: 14 Feb 2007
Posts: 115
Helped: 8


Post30 Jun 2007 16:32   

Simple questions on RS232 interfacing


what hardware (circuit) would you recomend to test the port software
Back to top
turbina



Joined: 10 Jun 2007
Posts: 54
Location: North Italy (Udine)


Post30 Jun 2007 23:38   

Simple questions on RS232 interfacing


only jumpers between inputs and outputs
Back to top
ultrabrains



Joined: 14 Feb 2007
Posts: 115
Helped: 8


Post01 Jul 2007 11:57   

Simple questions on RS232 interfacing


what do you mean by " only jumpers between inputs and outputs " ? can you be a bit more specific.
Back to top
turbina



Joined: 10 Jun 2007
Posts: 54
Location: North Italy (Udine)


Post02 Jul 2007 0:17   

Simple questions on RS232 interfacing


all TXD-DTR and RTS are 3 outputs and can be connected with 4 inputs DCD CTS DSR and RI .
you can with a program rs232io.exe set every output and if itis connected with a input(jumper) you can test that output and that input the red point become green.
Back to top
ultrabrains



Joined: 14 Feb 2007
Posts: 115
Helped: 8


Post03 Jul 2007 13:56   

Simple questions on RS232 interfacing


Hi turbina,

let me see a sketch(circuit) to implement the TXD-DTR and RTS as outputs , and DCD CTS DSR and RI as inputs

thanks
Back to top
turbina



Joined: 10 Jun 2007
Posts: 54
Location: North Italy (Udine)


Post03 Jul 2007 14:33   

Re: Simple questions on RS232 interfacing


you can see a interface with max232 that convert ieee rs232 signal level to ttl level (0-5volts) after tou can drive a led, a pin port of microprocessor o logic, the current sink of max232 is 5milliamperes , you can take the 5volts for max232 from pin 1 and 4 of a free usb-port.


Sorry, but you need login in to view this attachment

Back to top
heryspd



Joined: 17 Jun 2009
Posts: 1
Location: jakarta


Post17 Jun 2009 11:17   

Re: Simple questions on RS232 interfacing


thanks you
Back to top
ultrabrains



Joined: 14 Feb 2007
Posts: 115
Helped: 8


Post15 Oct 2009 5:44   

Simple questions on RS232 interfacing


Turbina, i forgot to say thank you.

THANKS
Back to top
twinklu7



Joined: 11 Aug 2009
Posts: 1
Location: hyderabad


Post15 Oct 2009 8:21   

Re: Simple questions on RS232 interfacing


Hi,
I am a newbie ..i am interfacing MCU atmega8l to PC through RS232 ,here i did the loop back test via hyperterminal i didn't get the response from the MCU.
And before communicating to mcu i did the loop back test to the following for these i got the response

Start from the cable and work you way over to the PIC. Use hypertem to do a loopback in each of the following steps. I understand that step 1 will pass and step 4 will fail in your case.

1. Remove the RS232 cable from the Inchworm and short pins 2 and 3 on the cable.

2. If step 1 passed: Remove the MAX232. Look at the schematic and determine which pins on the MAX232 socket connect to 2 and 3 on the DB9. Short these pins at the MAX232 socket. If this works you know the RS232 signal is getting to the MAX232. If not you have bad solder joints between the DB9 and the MAX232 socket.

3. If step 2 passed: Replace the MAX232 and remove the PIC. Short the MAX232 pins that go to TX and RX on the PIC at the MAX232 chip. If this works your MAX232 is working.

and here the 4 th step i tried but i am not able to identify where my communication pbm is?So i need some assitance

4. If step 3 passed: Short the TX and RX pins on the PIC. If this fails you have bad solder joints between the MAX232 and the PIC.

Please would anybody try to help out..
Back to top
priask



Joined: 06 Nov 2009
Posts: 0
Location: bangalore


Post06 Nov 2009 7:41   

Re: Simple questions on RS232 interfacing


hi ol....m working on uart core development at present...i hv developed d core using VHDL language n done the loop back test by burning it in FPGA....nw i want to test it by interfacing it with PC through RS232....can anybody help me with the interfacing program n the procedure....pls its really urgent and essential.
Back to top
suggu999



Joined: 25 Feb 2009
Posts: 2


Post19 Nov 2009 11:43   

Re: Simple questions on RS232 interfacing


hi,

i would like to interface the 89c51 with pc, how can i send the data available on port 1.0 to the hyperterminal, can anybody please help me, it willbe better if u send me the assembly code.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> Simple questions on RS232 interfacing
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Simple RS232 level converter...??? (2)
Simple RS232 level converter... (1)
MSP430 with RS232 interfacing (4)
Interfacing devices to PLC via RS232 (3)
Interfacing a USB Flash drive with rs232 (7)
Interfacing RS232/USB/Parallel port to 8051 microcontroler (4)
A simple mathematic questions (4)
Two simple Questions (2)
two simple questions (3)
A couple of simple questions (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS