loop write eeprom


Results 1 to 14 of 14

Threaded View

  1. #3
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    I change the code and i believe now it's OK.

    MAIN:

    bla ... bla ...
    bla ... bla ...
    bla ... bla ...

    LOOP:

    Button UP,1,10,2,b1,1,MONTE
    Button DOWN,1,10,2,b2,1,DESCEND
    Button CH_PAS,1,255,0,b3,1, CHOIX
    PAUSE 100
    I2CREAD SDA,SCL,ADDR2,[LOCK]
    GoSub AFFICHAGE
    GoTo LOOP

    MONTE: '** INCREASE THE FREQUENCY OF 1 PAS (STEP)

    TMP = TMP + PAS
    If TMP > 410 Then TMP = 0
    GOSUB MEM
    GoTo MAIN

    DESCEND: '** DECREASE THE FREQUENCY OF 1 PAS (STEP)

    If TMP<PAS Then RAZ_TMP
    If TMP = 0 Then TOP
    TMP = TMP - PAS
    GOSUB MEM
    GoTo MAIN

    TOP:

    TMP=410
    GOSUB MEM
    GoTo MAIN

    RAZ_TMP:

    TMP = 0
    GOSUB MEM
    GoTo MAIN

    MEM:

    WRITE 0, TMP_LO
    WRITE 1, TMP_HI
    Return
    Last edited by savnik; - 13th August 2006 at 23:31.

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Controlsystem for compact sporting (clay shooting)
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th July 2009, 16:48
  3. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 19:59

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