need help in lookup


Results 1 to 28 of 28

Threaded View

  1. #20
    Join Date
    Apr 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    thank you joe, the problem i have is not lookup or eeprom or lcd,the problem is when i put variables the code doesnt works, like when i put the variables with the code above. i have problem when the pic start it losts betweenm the main shiftout and the variable so it doesnt work bcz im pausing the variable 1000 and shiftout is too fast so can i see the numbers on lcd ,the lcd and numbers shown good but just i add any variables it doesnt work or shift out things , i use pic 16f84 i think it hasnt analog stuff , thank you joe for your best


    for b = 0 to 9
    lookup n, [...,...,...,],bo
    or read ..,..
    pause 1000
    next b
    example
    Include "modedefs.bas"
    'DEFINE SHIFT_PAUSEUS 1

    DEFINE OSC 4
    SDO VAR PortB.0
    SCLK var PortB.1
    DPIN var PORTA.0
    CPIN var PORTA.1
    B0 var byte
    B1 var byte
    B2 var byte
    B3 var byte
    B4 var byte

    symbol Digit_1 = portb.4 renaming portb.4 to Digit_1, These can only hold the value 1 or 0

    symbol Digit_2 = portb.5
    symbol Digit_3 = portb.6
    symbol Digit_4 = portb.7

    SCLK = 8 attempt to give portb.1 the value of 8 ???
    TRISB = 0 set all port b as outputs
    for b3 = 0 to 9
    I2CREAD DPIN,CPIN,$A0,b3,[B1]
    pause 1000
    next b
    main:
    Digit_2 = 1 Make renamed ports HIgh.
    Digit_3 = 1
    digit_4 = 1
    SHiftOUT SDO,SCLK,0,[b1]
    Digit_1 = 0

    pause 1
    Digit_1 = 1
    Digit_3 = 1
    digit_4 = 1
    SHiftOUT SDO,SCLK,0,[b2]
    Digit_2 = 0

    pause 1
    Digit_1 = 1
    Digit_2 = 1
    digit_4 = 1
    SHiftOUT SDO,SCLK,0,[..]
    Digit_3 = 0

    pause 1
    Digit_1 = 1
    Digit_2 = 1
    digit_3= 1
    SHiftOUT SDO,SCLK,0,[..]
    Digit_4 = 0

    pause 1
    goto main

    end

    and shiftout the variables it keeps just blinkin very slow no numbers nothings .
    Last edited by malwww; - 14th May 2009 at 05:32.

Similar Threads

  1. Graphic LCD with PICbasic pro
    By amindzo in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th November 2012, 12:45
  2. Lookup Table
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th March 2008, 11:38
  3. ADCIN and LOOKUP ...
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th June 2007, 22:02
  4. problem with USART
    By leemin in forum Serial
    Replies: 4
    Last Post: - 11th December 2006, 18:56
  5. Confused On Dig & Lookup
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th December 2006, 22:49

Members who have read this thread : 0

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