Searching \ for 'Serial input on PC?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/io/serials.htm?key=serial
Search entire site for: 'Serial input on PC?'.

Truncated match.
PICList Thread
'Serial input on PC?'
1997\03\04@001056 by Jeff 'n Kristen Kroll

flavicon
face
Slightly off subject but not really since I need the info for a PIC
project.

       Can anyone tell me the easiest way to view serial data coming into a PC.
All I am really looking for are some Qbasic commands to display serial data
coming from a PIC or elsewhere.

                                               Thanx,

                                               Jeff Kroll

1997\03\04@034215 by Scott Walsh

flavicon
face
    Jeff,

    If you are looking at serial data on a COM port, then using any
    terminal emulator type application will suffice. If you are running
    Win3.11 then your already have Terminal, and under Win95 you have
    HyperTerminal.

    However there are a couple of shareware emulators around. These
    programs are really only suitable for looking at ASCII data, however
    if you are tranmitting binary data then a protocol analyser may be a
    good investment.

    regards
    Scott.

    +--------------------------------------------------------------------+
    | Scott Walsh                    Tel: +44 1793 84 22 18              |
    | Design Engineer                Fax: +44 1793 84 88 53              |
    |                                Tlx: 44626 PLANAC G                 |
    | Plantronics International                                          |
    | Wootton Bassett, Wiltshire,                                        |
    | SN4 8QQ, England.              EMail: spam_OUTscott.walshTakeThisOuTspamplantronics.com  |
    +--------------------------------------------------------------------+



                                               ______________________________
                                               Reply Separator
                                               ________________________________
                                               _
                                               Subject: Serial input on PC?
                                               Author:  pic microcontroller
                                               discussion list
                                               <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU> at
                                               INTERNET
                                               Date:    03/03/97 20:54


                                               Slightly off subject but not
                                               really since I need the info for
                                               a PIC project.

                                               Can anyone tell me the easiest
                                               way to view serial data coming
                                               into a PC.
                                               All I am really looking for are
                                               some Qbasic commands to display
                                               serial data coming from a PIC or
                                               elsewhere.

                                               Thanx,

                                               Jeff Kroll

1997\03\04@034219 by Scott Walsh

flavicon
face
    Oh Yeah,

    Also Jeff, remeber that the PC will transmit on pin3 and recieve on
    pin 2 of a DB9 pin serial port, also make sure you have the ground on
    pin 7 connected.

    Scott.


______________________________ Reply Separator _________________________________
Subject: Serial input on PC?
Author:  pic microcontroller discussion list <PICLISTspamKILLspamMITVMA.MIT.EDU> at
INTERNET
Date:    03/03/97 20:54


Slightly off subject but not really since I need the info for a PIC
project.

       Can anyone tell me the easiest way to view serial data coming into a PC.
All I am really looking for are some Qbasic commands to display serial data
coming from a PIC or elsewhere.

                                               Thanx,

                                               Jeff Kroll

1997\03\04@192655 by Lee Jones

flavicon
face
>> Can anyone tell me the easiest way to view serial data coming into a PC.

> Also Jeff, remeber that the PC will transmit on pin3 and recieve on
> pin 2 of a DB9 pin serial port, also make sure you have the ground on
> pin 7 connected.

This is incorrect.  The correct pin usage is:

                            25 pin           9 pin
RS232 signal               male D-sub      male D-sub

transmit data (from PC)         2               3

receive data (to PC)            3               2

signal ground                   7               5

Notice the different pin usage between the 25 and 9 pin connectors.

                                               Lee Jones

-------------------------------------------------------------------
Jones Computer Communications             .....leeKILLspamspam.....frumble.claremont.edu
509 Black Hills Dr, Claremont, CA 91711         voice: 909-621-9008
-------------------------------------------------------------------

1997\03\05@035231 by all (Stephen Birchall)
flavicon
face
>Slightly off subject but not really since I need the info for a PIC
>project.
>
>        Can anyone tell me the easiest way to view serial data coming into
>a PC.
>All I am really looking for are some Qbasic commands to display serial data
>coming from a PIC or elsewhere.
>

Jeff

the following is a copy of a reply I sent to someone else and allows you to
write as well as read the serial port. (It is taken from a larger program)

under setup, the port address for the appropriate port (com1 or com2) is
declared as a variable for use in later routines.

The line OPEN " etc " is important as it configures the port as to baud
rate etc. All the info is in the QBAsic Help menu.

under sub-routines, the outbyte routine takes a variable (dout%, derived
elsewhere in the program) and puts it on the output port.
The inbyte routine reads the value on the input port and declares it as a
variable (din%)

Because the baud rate is 9600, this means that sending or receiving a byte
of data takes about 1 mSec, hence it is useful to use a delay routine when
sending successive bytes of data.



hope this helps

Steve


REM Set up  _______________________________________________________________


comport% = &H3F8

OPEN "com1:9600,n,8,1,bin,cd0,cs0,ds0,op0" FOR RANDOM AS #1 LEN = 1



REM Sub-Routine Area    ____________________________________________________

outbyte:
       OUT comport%, dout%
       RETURN

inbyte:
       din% = INP(comport%)            REM Jeff, this is the read line
       RETURN

delay:
       REM 1 millisecond delay
       del = 3                         REM value of del depends on clock speed
       DO
       del = del - 1
       LOOP UNTIL del = 0

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...