Serin Not Recognizing Qualifier From Another PIC


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Dec 2019
    Location
    Stuart, FL USA
    Posts
    15


    Did you find this post helpful? Yes | No

    Default Re: Serin Not Recognizing Qualifier From Another PIC

    Hi Troy,
    Here's my OSCON
    OSCCON = %01100000 ' Set system clock 4MHz(1MHz internal w/x4 PLL enabled)

    My SERIN SYNTAX
    SERIN PrgIn,1,5000,PassProg,[ProgIDRx],IDByteRx ' Check for new I.D.

    My Qualifier Variable
    ProgIDRx VAR BYTE ' Received Programmer ID

    My Byte of interest
    IDByteRx VAR BYTE ' New IDByte

    This should work, right???

  2. #2
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    169


    Did you find this post helpful? Yes | No

    Default Re: Serin Not Recognizing Qualifier From Another PIC

    Quote Originally Posted by JESmitter View Post
    Hi Troy,
    Here's my OSCON
    OSCCON = %01100000 ' Set system clock 4MHz(1MHz internal w/x4 PLL enabled)

    My SERIN SYNTAX
    SERIN PrgIn,1,5000,PassProg,[ProgIDRx],IDByteRx ' Check for new I.D.

    My Qualifier Variable
    ProgIDRx VAR BYTE ' Received Programmer ID

    My Byte of interest
    IDByteRx VAR BYTE ' New IDByte

    This should work, right???
    Well, that's what I'm confused about. Don't you need to actually nominate something as the qualifier rather than an empty variable?

    p207 of the manual:
    "list of data items to be received may be preceded by one or more qualifiers enclosed within brackets. SERIN must receive these bytes in exact order before receiving the data items. If any byte received does not match the next byte in the qualifier sequence, the qualification process starts over (i.e. the next received byte is compared to the first item in the qualifier list). A Qualifier can be a constant, variable or a string constant. Each character of a string is treated as an individual qualifier."

    So, if you have an empty variable as a qualifier, I guess serin is waiting for a "null" to arrive before accepting anything into IDByteRx.

    That's the way I read it, but again, I've never really used serin.

    Troy

  3. #3
    Join Date
    Dec 2019
    Location
    Stuart, FL USA
    Posts
    15


    Did you find this post helpful? Yes | No

    Default Re: Serin Not Recognizing Qualifier From Another PIC

    Hi Troy,

    I understand what you're saying. But I do declare ProdIDRx as a Byte variable in the beginning of the program as "ProgIDRx VAR BYTE".

    What am I missing here?

  4. #4
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    169


    Did you find this post helpful? Yes | No

    Default Re: Serin Not Recognizing Qualifier From Another PIC

    Quote Originally Posted by JESmitter View Post
    Hi Troy,

    I understand what you're saying. But I do declare ProdIDRx as a Byte variable in the beginning of the program as "ProgIDRx VAR BYTE".

    What am I missing here?
    Yes, I'm aware you declare it, but you don't assign anything to it. It's there as a newly declared variable with the contents of null. So, I'm guessing serin is waiting for a null character to arrive in your serial stream before accepting anything into your receiving placeholder. That's my interpretation of what I'm reading anyway.

    Troy

Similar Threads

  1. RF Module Qualifier, CRC?
    By tazntex in forum Serial
    Replies: 14
    Last Post: - 22nd March 2010, 16:15
  2. HSERIN qualifier
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th December 2009, 11:53
  3. ICSP not recognizing..
    By sirvo in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 11th June 2008, 20:31
  4. recognizing a serin2 string
    By ehertz in forum Serial
    Replies: 2
    Last Post: - 9th September 2006, 03:24
  5. Herin Qualifier
    By MORAND in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th May 2004, 16:56

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