Serin Not Recognizing Qualifier From Another PIC


Results 1 to 24 of 24

Threaded View

  1. #14
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Default Re: Serin Not Recognizing Qualifier From Another PIC

    works perfectly for me if you don't try to use qualifier before you actually set it to a meaningful value as rocket troy indicated

    Code:
    #CONFIG; set CONFIG1 for internal oscillator, watchdog on, MCLR pin as OFF
     __config _WDTE_ON & _MCLRE_OFF & _INTOSCIO & _PWRTE_ON
    
    
    #ENDCONFIG
    
    
    
    
    OSCCON = %  01100000 ' Set system clock 4MHz
    
    
    
    
    DEFINE OSC 4 '  PBP timing to 4MHz system clock
    
    
    OPTION_REG.7 = 0 ' Enable Weak Pullups Control
    WPU = %  00100000 ' Disable all Weak Pullups except GPIO.5
    ANSEL = 0 ' No analog inputs
    TRISIO = %  00111001 ' Make GP1, GP2 outputs. GP0, GP3, GP4 & GP5 = inputs
    CMCON0 = %  00000111 ' Turn off comparators
    
    
    
    
    
    
    IDByte var byte ' Receiver ID.
    IDByteRx var byte ' New IDByte
    
    
    Z1Alarm var GPIO.2 ' Zone1 Alarm LED
    Z2Alarm var GPIO.1 ' Zone2 Alarm LED
    
    
    ProgIDRx var byte ' Received Programmer ID
    PrgIn var GPIO.5 ' Programmer Detect & Data Port
    
    
    
    
    
    
    
    ProgIDRx = $d  '   define qualifier
    gpio=0
    
    
    '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''
    MainLoop:
    Serin PrgIn,1,[ProgIDRx],IDByteRx ' Wait  for new I.D. to arrive
    GOSUB UpdateID ' Verify arrival and execute UpdateID Subroutine
    GOTO MainLoop
    
    
    
    
    
    
    
    UpdateID:
    Z1Alarm = 1 : Z2Alarm = 1 ' LEDs to Confirm programing Subroutine
    PAUSE 500
    Z1Alarm = 0 : Z2Alarm = 0 ' Turn off LEDs
    PAUSE 1000
    Z1Alarm = 1 : Z2Alarm = 1 ' LEDs to Confirm in programing mode
    PAUSE 1000
    Z1Alarm = 0 : Z2Alarm = 0 ' Turn off LEDs
    IDByte = IDByteRx
    'Write 1, IDByte ' Write new ID to EEPROM
    
    
    RETURN
    
    
    
    
    ENd
    Last edited by richard; - 19th April 2024 at 03:29.
    Warning I'm not a teacher

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