CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2010
    Posts
    3

    Serial Port Communication information required

    Hi Folks,

    I am going to work on Serial port Comm. using MSCOMM and SAXCOMM controls,
    before that

    i need clarifications on the properties of these controls like baud rate,parity bits,data bits and stop bits,rthreshold,sthreshold
    and also to know the purpose of all above parameters.


    Thanking you in Anticipation.......

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Serial Port Communication information required

    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Serial Port Communication information required

    Rthreshold determines when the receive event will fire. If set to 0 it will not fire. If set to 1 it will fire when 1 or more bytes are received. If set to 100 it will fire only when 100 or more bytes are received. In most cases this is set to 1 or 0.

    SThreshold is the same except relates to bytes sent rather than received.

    Sax comm has an additional property [at least V6 does] called ignore oncomm. When this property is true the control fires the receive event when rthreshold characters are received instead of the oncomm event.

    Question why are you using both controls?
    In simple programs that just send and receive data streams MSComm is fine. In more complicated programs where you need to display a terminal screen or transfer data via file transfer protocols such as x, y , z modem Sax Comm is the way to go.
    Always use [code][/code] tags when posting code.

  4. #4
    Join Date
    Jun 2010
    Posts
    3

    Re: Serial Port Communication information required

    Thanks for the updates...

    Actuallly I am using only SAXCOMM in my Application.

    I want to know about the Lookup -- Text,Length,Timeout property..
    and more about the SAXCOMM additional properties..which are to be taken care while developing Application.

    --? Is Start/Stop Bits are send/receive from DTE/DCE .

    --? what is the Purpose and different types of Handshaking
    and how much its important while dealing with serial port comm.

    Thanking you ...

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Serial Port Communication information required

    See the documentation for info on specific Saxcomm properties.

    Handshaking is basically used to prevent buffer over run if the receive buffer is full then the receiver will send a wait signal to the sender so the sender does not keep sending data that has no where to go. An ok to send will be signaled when there is room in the buffer again.

    Handshaking is most important at faster speeds and on slower devices. Sending data from a new pc to a really old pc at 38400 baud would most likely require handshaking to succeed.
    Always use [code][/code] tags when posting code.

  6. #6
    Join Date
    Jun 2010
    Posts
    3

    Re: Serial Port Communication information required

    Hi DataMiser,

    Can you please explain me in Detail with Example
    How the below SAXCOMM attributes are Used and the purpose:

    -- Lookup text
    -- Start Bits
    -- Stop bits

    I saw somewhere in the internet, values for Look Up text is like below.
    "-", 0, 10

    what I am thinking is its text which we are looking in the input buffer data of saxcomm control.please correct me if I am wrong.

    I am not getting any idea of start and stop bits.I also saw some properties like below.

    -- DATA_STRT_BYT_NUM
    -- DATA_SIZE_IN_BYTS
    -- STRT_CTRL_TEXT
    -- END_CTRL_TEXT

    can you please explain to me if you are aware of them.

    I am not find any link on saxcom properties or on properties role in serial communication and i am not found all these properties in my saxcomm control.

    I am using saxcomm version 7.0.

    Thanking you in Anticipation.

    KV

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured