Data tables again !


Results 1 to 11 of 11

Threaded View

  1. #3
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Malcom,
    Here is something you might be able to try. Add as the first data item in each pattern the number of items in the sequence (I counted quick, so there might be a mistake in the values I added)
    Code:
    patt1 data 17,16,1,2,4,8,16,32,64,128,128,64,32,16,8,4,2,1 
    patt2 data 9,8,129,66,36,24,24,36,66,129 
    patt3 data 17,16,1,3,2,6,4,12,8,24,16,48,32,96,64,192,128,0 
    patt4 data 17,16,1,128,2,64,4,32,8,16,8,32,4,64,2,128,1,0 
    patt5 data 13,12,24,60,126,255,231,195,129,0,129,195,231,255 
    patt6 data 14,13,1,2,4,8,17,34,68,136,16,32,64,128,0 
    patt7 data 9,8,128,64,32,16,8,4,2,1
    Then use the something like the following to get the actual data:
    Code:
    steps VAR BYTE
    counts VAR BYTE
    temp VAR BYTE
    
    READ Patt1, steps
    FOR counts = 1 TO steps
         READ (Patt1 + counts), temp
         PORTB = temp
    NEXT counts
    This should allow you to sequence through each step for the various patterns, regardless of size. You could then loop back and start the FOR..NEXT loop again if required. Or, move on to some other code, or a different pattern. Also, inside the FOR..NEXT loop you could insert any code you needed. Test for various conditions, and even break out of the loop if needed to move on.

    NOTE: I have not tested the actual code, as it is ment to be just quick example to get across my idea, So don't cut and paste it. Try to understand the CONCEPT presented.

    Regards,
    Steve
    Last edited by SteveB; - 13th June 2006 at 04:46.

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 03:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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