Serin Not Recognizing Qualifier From Another PIC


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Serin Not Recognizing Qualifier From Another PIC

    two thoughts looking at your code.........
    ...ProgIDRx = $A............ did you CLEAR ProgIDRx after reception and might need to be ....$"A" not sure but

  2. #2
    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 Amgen,

    Thanks for the reply. Yes, ProgIDRx is cleared. And its value is $A (or10). But, I haven't been able to receive it yet because nothing is being received. SERIN always exits upon the 5 second Timeout variable "PassProg" as if nothing is present at the pin.

    And, in addition, If I had noise on the pin, SERIN would never time out. So, that indicates that SERIN is, at least, partially working, I would think.

  3. #3
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Serin Not Recognizing Qualifier From Another PIC

    I don't really use serin so I can't be of much help, but just to educate me: isn't the contents inside the square brackets a qualifier or filter - like the WAIT modifier in serin2?

    Troy

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Serin Not Recognizing Qualifier From Another PIC

    one easy thing to do to troubleshoot your system....... add a temporary serout for the receiving 283 to see receptions and get all that working first as you continue with the rest of your code.... (I know you know all this) but it is like proofing the functions as you go along

  5. #5
    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

    Thanks Amgen. Good advice!

  6. #6
    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

    Still no progress. Beating my head against my desk on this one!

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Serin Not Recognizing Qualifier From Another PIC

    if using 12f683 ..... check your OSCCON ..... no PLL on 12f683 unless there is new 12f....
    Name:  osc.JPG
Views: 4460
Size:  74.9 KB

  8. #8
    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 Amgen,

    I don't recall why I included a PPL in my oscillator comment but, I believe that I have my OSCON statement correct for an internal 4 MHz cock. Right?

    OSCCON = %01100000 ' Set system internal clock 4MHz.

    Thank you for pointing that out!

  9. #9
    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???

  10. #10
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    172


    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

  11. #11
    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,

    Yes, the bracketed variable is the qualifier. SERIN won't receive or pass the data until it recognizes the presence of the qualifier in the received packet. For some reason, my qualifier is not being recognized or, GPIO.5 isn't correctly configured for SERIN? Or, something else???

  12. #12
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    172


    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,

    Yes, the bracketed variable is the qualifier. SERIN won't receive or pass the data until it recognizes the presence of the qualifier in the received packet. For some reason, my qualifier is not being recognized or, GPIO.5 isn't correctly configured for SERIN? Or, something else???
    Then, don't you need to nominate the qualifier as being something? like:

    Serin PrgIn,1,5000,PassProg,["ABC"],IDByteRx ' Wait for 5 seconds for "ABC" to arrive then put contents in IDByteRx?

    Troy

Similar Threads

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

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