Pic18f67k22 WDT


Results 1 to 10 of 10

Thread: Pic18f67k22 WDT

Threaded View

  1. #3
    Join Date
    Dec 2021
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: Pic18f67k22 WDT

    Hi


    In this loop i load receiving scan resolute list from wifi module, and load only the ssid name and rssi to message array.
    The loop do the job perfect, but in the beginning i did mistake with "if CHECK=>AX1 THEN GOTO break33 'END OF LIST"
    So the MCU become "MAD" ,turn-on the buzzer , and few output i have on my pcb and even send "nul" at uart Tx and stay at loop forever.
    It made me wonder, why the WDT didn't reset.

    Here is the loop.

    RE var byte[998]
    Message var byte[998]
    ;AX1 is total receiving bytes.
    ;CHECK is the start point

    Code:
    '******************************
    SearchSymbol: 'search "," Symbol
    '*** Must set T4 before send to this loop
    T1=0
    FOR A3 = CHECK TO AX1'
    IF RE[A3]=Symb THEN T1=T1+1
    IF T1=T4 THEN break9
    NEXT A3
    break9:
    CHECK=A3
    return
    
    
    '*********************************************
    '*** load all +SCAN SSID,RSSI list to Message array ***
    '*********************************************
    GET_SSID_list:
    MessageL=0
    T4=2 'multiple of the symbol x time "space"
    
    GET_SSID_list1:
    Symb=" " '"Space"
    GOSUB SearchSymbol 'Search THE SYMBOLE
    if CHECK=>AX1 THEN GOTO break33 'END OF LIST
    
    
    CHECK=CHECK+1 'to jump on the "space"
    if RE[CHECK]="," THEN  'If hidden wifi move to next line 
                T4=1 'multiple of the symbol
                goto  GET_SSID_list1
                endif
                
    FOR A3 = CHECK TO AX1 'Get SSID name
    if RE[A3]="," then break31
    Message[MessageL]=RE[A3]
    MessageL=MessageL+1
    next A3 
    break31:
    T4=2 'multiple of symbol,  JUMP on channel
    Symb=","
    gosub SearchSymbol
    
    
    CHECK=A3+1 'jump on ","
    Message[MessageL]="," 'insert "," Between ssid to rssi  (ssid,rssi)
    MessageL=MessageL+1
    FOR A3 = CHECK TO AX1 'Get RSSI 
    if RE[A3]=$D then break32 'CR  
    Message[MessageL]=RE[A3]
    MessageL=MessageL+1
    NEXT A3
    break32:
    CHECK=A3
    if CHECK=>AX1 THEN GOTO break33 'END OF LIST
    
    
    Message[MessageL]=$A 'insert LF
    MessageL=MessageL+1
    T4=1 'multiple of the symbol
    GOTO GET_SSID_list1 'Next line
    break33:
    RETURN
    Last edited by Ioannis; - 16th November 2024 at 13:05.

Similar Threads

  1. Replies: 8
    Last Post: - 18th September 2017, 23:29
  2. What commands reset the WDT?
    By pointjohn in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 4th November 2010, 16:47
  3. Detect reset by WDT
    By Art in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 13th April 2010, 08:34
  4. SLEEP, WDT and INT
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th March 2008, 14:45
  5. WDT-Reset - How to know
    By BigWumpus in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th November 2005, 17:33

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts