recognizing a serin2 string

Closed Thread
Results 1 to 3 of 3
  1. #1
    ehertz's Avatar
    ehertz Guest

    Default recognizing a serin2 string

    Hello all.

    I am new to pics and pic basic. I have a project where I would like to detect two different strings of data coming into a serial line. There will be a constant stream of data presented to the line, but I want to set an output port bit on when one sequence of letters/numbers is found and then reset that port bit when another sequence is found. Here are some details.

    1. incoming serial parameters, 8 bits, 1 stop, 45.45 baud
    2. listen to incoming data, set a bit high when "KC2NWG" is found in the stream
    3. listen to incoming data, set a bit low when "NNNN" is found in the stream.
    4. loop back to 2

    Thats it!

    In reality it will be a 5 bit byte coming in but I thought this example would be easiest to understand.

    Anyone help with this? I suspect I want to use the WAITSTR for SERIN2 function, but not sure how.

    thank you

  2. #2
    Join Date
    Mar 2003
    Commerce Michigan USA


    ehertz, Just use the "WAIT" modifier for the serin,Hserin command and place the string you are looking for. Do this for each string in the command and you have it. Its covered in the manual....

    Dave Purola,

  3. #3
    ehertz's Avatar
    ehertz Guest

    Default serin!

    thanks very much.

Similar Threads

  1. How about String Variables?
    By mytekcontrols in forum PBP Wish List
    Replies: 40
    Last Post: - 20th January 2015, 12:53
  2. GPS $GPRMC to PIC16F684. Need help with SERIN2
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th November 2009, 09:47
  3. Getting SERIN2 to work?
    By BobPigford in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 22nd July 2009, 20:10
  4. SERIN2 digit parsing
    By skimask in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th January 2007, 23:15
  5. Visual Basic 6 & Access 2000
    By Demon in forum Off Topic
    Replies: 33
    Last Post: - 7th September 2006, 04:39

Members who have read this thread : 0

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