tables using PBP and asm command retlw


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: tables using PBP and asm command retlw

    I was using Lookup but the table size is restricted by page boundaries (thus only 96 characters can be stored in a table).

    Here's the code I was using for a small data table:

    Start:
    y=0:z=1
    For x= 0 to 15 'reading 16 bytes/characters from table Imagebyte
    lookup x, ["THIS IS A TEST"], imagebyte
    GoSub Writebyte
    next x
    goto Start


    Writebyte: 'Subroutine to send serial image data to shift registers
    y=y+1
    'high clockpin This statement NOT NEEDED
    shiftout datapin,Clockpin,MSBFirst,[imagebyte] 'shift out imagebyte one bit at a time
    'low clockpin This statement NOT NEEDED
    lcdout $fe, 1 'clear display
    lcdout $FE, $14 , imagebyte 'Display value on LCD
    Low PORTE.2 'strobe for LCD
    'pause 200
    z=y//4 'get modulus (remainder) remainder is only zero when 4 divides
    If z=0 then 'evenly into x (4/4= 1, 0 remainder, 8/4=2, 0 remainder
    high Latch '4 bytes in registers, ie 32 bits so enable both register latches
    pause 1 'pause 1 mS may not need.
    outena=0 ' I have 4 bytes, light up LEDs

    Are you saying I can use Pokecode to create my table of values, and Peekcode to retrieve them? 255 values ? You have about 150 values in your table example below. What does your program do?

  2. #2
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: tables using PBP and asm command retlw - solved

    Alain, thanks for the tip about using PokeCode and Peekcode. This did the trick. I put 255 values in a table and was able to read everyone of them. So simple...

    Why is Melanie saying to use Writecode/Readcode? What is the difference?

    And why does PokeCode work where Lookup doesn't (any more than 96 values and it cacks)? In the PBP manual it states that Lookup and Arrayread can have 255 values. Is this an error, or just not the "whole truth"?

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: tables using PBP and asm command retlw

    I am trying to understand the table method and I came across this example. I am having trouble visualizing (Alain's fading table) this method as to how it will be an equivalent table in lets say in an excel file. I mean will it just be row numbers (starting from lets say 881) and 1 column with all the stored values one below the other starting from 24, and why is "_" sign is there in the table , I don't know if I have made my question clear, but I can try explain differently if needed
    ___________________
    WHY things get boring when they work just fine?

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