PIC18F4620 Write Command


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Re: PIC18F4620 Write Command

    Hi! Good day! Henrik,
    So why did you try writing to $4205 then?
    I am using the program which my senior written and him already left the company. So, i not sure what is going to be happen using that command. Now, i understand from your explaination.

    Sorry for making you confuse.

    Let me show u the exact code that found error part.
    Code:
    'Extract part of the code that have an error
    STEP_SELECT:
    
        read $101,STEP_ADDRESS
        STEP_ADDRESS = STEP_ADDRESS + 1
        WRITE $101,STEP_ADDRESS
    
        NG_COUNTER = 0
        write $103,NG_COUNTER
    
        DEBUG "CHECKING STEP_ADDRESS = ",DEC STEP_ADDRESS,10,13
    'Here, the result still can see at hyperterminal screen 
    
        if STEP_ADDRESS = 1 then MULTIMETER_JUDGE 
        if STEP_ADDRESS = 2 then ADDR_30       
        if STEP_ADDRESS = 3 then ADDR_31       
        if STEP_ADDRESS = 4 then ADDR_32       
        if STEP_ADDRESS = 5 then ADDR_33       
        if STEP_ADDRESS = 6 then ADDR_34       
        if STEP_ADDRESS = 7 then ADDR_35       
        if STEP_ADDRESS = 8 then ADDR_36       
        if STEP_ADDRESS = 9 then ADDR_37       
        if STEP_ADDRESS = 10 then ADDR_38      
        if STEP_ADDRESS = 11 then ADDR_39      
        if STEP_ADDRESS = 12 then ADDR_40     
        if STEP_ADDRESS = 13 then ADDR_41      
        if STEP_ADDRESS = 14 then CHARGING_CHECK      
        if STEP_ADDRESS = 15 then CHARGING_CHANGE_DC  
        if STEP_ADDRESS = 16 then END_PROCESS 
    
    goto STEP_SELECT
    
    CHARGING_CHECK:
        HIGH RLY5_1_CHARGING_SUPPLY         
        PAUSE 1000
        LOW RLY5_1_CHARGING_SUPPLY         
        goto MULTIMETER_JUDGE
    goto STEP_SELECT
    
    MULTIMETER_JUDGE:
        READ $101,STEP_ADDRESS:WRITE $101,STEP_ADDRESS
    
        IF STEP_ADDRESS = 0 then 
            DEBUG "STEP_ADDRESS =  ",DEC STEP_ADDRESS,10,13
    'Here, the result still can see at hyperterminal screen 
            serOut GPIB_TX,N9600,["F5,R5,PR2,CO1,HI+00.200E-3,LO-01.000E-3",13]
            pause 500
            GOTO CONT_CURRENT_CHECK
        endif 
    
        IF STEP_ADDRESS = 1 and VERSION_SW = 1 then 
            DEBUG "(J4) STEP_ADDRESS =  ",DEC STEP_ADDRESS,10,13
    'Here, the result still can see at hyperterminal screen 
        	SerOut GPIB_TX,N9600,["F5,R7,PR2,CO1,HI+090.00E-3,LO+070.00E-3",13]
            pause 500
            GOTO CONT_CURRENT_CHECK
        ENDIF    
        
        IF STEP_ADDRESS = 14 THEN 
            DEBUG "STEP_ADDRESS =  ",DEC STEP_ADDRESS,10,13
    'At here, the result can't see at hyperterminal screen...i wonder why this happen? 
        	SerOut GPIB_TX,N9600,["F5,R7,PR2,CO1,HI+420.00E-3,LO+380.00E-3",13]
            pause 500
            GOTO CONT_CURRENT_CHECK
        ENDIF
    
    CONT_CURRENT_CHECK:
    I only show the part of the program that error occurred. Hopefully u can understand that.
    TQ and BR
    Last edited by csooi08; - 26th November 2013 at 04:58.

Similar Threads

  1. Required Time for WRITE Command
    By rsocor01 in forum General
    Replies: 2
    Last Post: - 1st December 2011, 01:21
  2. EEPROM WRITE Command
    By aajgss in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th October 2011, 07:58
  3. EEPROM Write command with interrupts??
    By Elnino in forum General
    Replies: 4
    Last Post: - 23rd November 2009, 07:44
  4. help with write command
    By cphillips82 in forum General
    Replies: 9
    Last Post: - 21st April 2008, 00:49
  5. Using the Write Command
    By in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th April 2003, 03:09

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