need help in lookup


Results 1 to 28 of 28

Threaded View

  1. #13
    Join Date
    Apr 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    hi again joe.
    im trying to make a counter from 0 to 9999, i want to use the same code u fixed for me' well i use 74hc164 and 4 digit l7segment leds now i want to write a variables for 4 digits and shiftout, if it will works please im putin digits in porta.0 to 3, im confused how to use a variable works with shiftout, have a great day Joe .!

    ' I2CREAD and I2WRITE Commands

    Include "modedefs.bas"

    DEFINE SHIFT_PAUSEUS 1000
    SDO VAR PortB.0
    SCLK var PortB.1

    SCLK = 8

    DPIN var PORTA.0
    CPIN var PORTA.1
    B0 var byte
    B1 var byte
    B2 var byte

    N var byte
    portB = 0
    TRISB = 0

    pause 100

    For B2 = 0 To 9
    lookup b2,[252,96,218,242,102,182,190,224,254,246],b0
    I2CWRITE DPIN,CPIN,$A0,b2,[ b0]
    Pause 20
    Next B2

    loop: For B3 = 0 To 9
    I2CREAD DPIN,CPIN,$A0,b3,[B1]
    pause 1000

    SHiftOUT SDO,SCLK,0,[b1]
    '
    Next B3

    Goto loop
    end
    Last edited by malwww; - 12th May 2009 at 18:03.

Similar Threads

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