tables using PBP and asm command retlw


Results 1 to 5 of 5

Threaded View

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

    Default tables using PBP and asm command retlw

    I'm working on a 32 bit POV project and have the hardware all sorted out and tested with a small PBP program that sends out Ascii characters from a string "This is a Test". I used the LOOKUP command to read the bytes and output to the 32 light-thingy which I verify is displaying four bytes of Ascii text.

    Now it's time to send an actual drawing of sorts using a bigger table (more than 14 bytes in "This is a Test"). My table is 255 bytes long and I get the dreaded "unable to fit variable" error because page boundary limitation.

    I read many posts on this forum and Google search and see various ways around the issue but I don't know which is easiest or applicable.

    I saw a method where the user created a table (the program was all in assembler) that began like this:

    ImageData ADDWF PCL,F
    ; Page boundary, image data starts here. There are 255 rows each one byte long
    RETLW B'10101010'
    RETLW B'11111111'
    RETLW B'00000000'

    Can I jump to this table with a Call? How do I integrate the two programs (one in PBP and the other-the data table-in assembler)?
    What housekeeping, initialization do I have to do to get the programs working together?

    Can I/should I/ use Writecode-Readcode per Melanie's document? Isn't RETLW easier? Data is constant, not variable.

    I haven't done any assembler programming with this PIC 16F628 and just started with PicBasic Pro.
    Last edited by queenidog; - 23rd May 2012 at 00:21.

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