serin or debugin items


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326

    Default serin or debugin items

    good dat to all of you in the forum!

    > I will like to understand if the "timeout " set in the serin or debugin refers to a NO received signals ( or line set to 0Vdc ) or at any kind of signals received ( noise for example ).
    If noise is received, does the timeout trigger and send my program to a particular label ?

    > can I set a timeout and a "string " after which the received data is stored ?
    What will be the correct syntax '

    Thanks for any assistance
    regards,
    Ambrogio

  2. #2


    Did you find this post helpful? Yes | No

    Default Timeout is defeated by noise

    Timeout only works for a noise free line in the idle state. If the line is in the opposite state timeout is skipped. Likewise if the line has noise, that will be seen as data and never get to the end of the timeout period.

    HTH
    BrianT

  3. #3
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default serin or debugin items

    Thanks a lot BrianT.
    This is exactly what I was searching for .

    Regards,
    Ambrogio

  4. #4
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default serin or debugin items

    Hi, BrianT:

    probably you will be able to help me on this item:

    I wrote a small program that reads some bytes of data coming from a radio receiver module. I do not want that the receiver program gets stuck in case the transmitter goes off for some reason. The receiver program is this :

    SERIN PORTB.0,N1200,["COUNT"],W
    SERIN PORTB.0,N1200,["ST0"],S_T.BYTE0
    SERIN PORTB.0,N1200,["ST1"],S_T.BYTE1
    SERIN PORTB.0,N1200,["SRH0"],S_RH.BYTE0
    SERIN PORTB.0,N1200,["SRH1"],S_RH.BYTE1
    SERIN PORTB.0,N1200,["WIND"],WND
    SERIN PORTB.0,N1200,["IRR0"],IRR.BYTE0
    SERIN PORTB.0,N1200,["IRR1"],IRR.BYTE1
    SERIN PORTB.0,N1200,["VBAT0"],V_BATT.BYTE0
    SERIN PORTB.0,N1200,["VBAT1"],V_BATT.BYTE1

    If the transmitter goes off then the receiver locks up waiting for the "STRING". How could I overcome this problem ?

    Thanks a lot for any help on the matter.
    Regards,
    Ambrogio

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Bruce gave us a work around for this problem.
    http://www.picbasic.co.uk/forum/showthread.php?t=12554
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

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