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

    Thank you Henrik for you prompt reply.

    The Receiver PIC's GPIO.5 is indeed configured as an input and the two systems do share a common ground.

    Transmit PIC - GPIO.2 is set as an output and the outbound packet is sent by SEROUT DataOut,1,[ProgID,IDByte]

    Receive PIC
    - GPIO.5 is set as an input and is configured to receive the packet by SERIN
    PrgIn,1,5000,PassProg,[ProgIDRx],IDByteRx

    I didn't include the transmitter PIC code because the oscilloscope verified that the packet is being sent.

    I wonder... what logic state should SERIN be idling at? I have it at logic high to generate a "mark" condition.

  2. #2


    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

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

  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

    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

  5. #5


    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

  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

    Thanks Amgen. Good advice!

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

  8. #8


    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: 4313
Size:  74.9 KB

  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 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???

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

    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, 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