Author Topic: pic18f lookup table problem  (Read 8557 times)

0 Members and 1 Guest are viewing this topic.

Offline LesterwyattTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: gb
    • My YouTube Channel
pic18f lookup table problem
« on: January 05, 2015, 07:12:35 pm »
Hello everyone.

I was wondering if anyone could help me or point me in the right direction.
I have implemented a lookup table for my Nokia LCD project. The lookup table consists of bitmap data (7 byte for each character 'see below'). what I was hoping to do, is select and display a character based on a BCD value. So for instance; if I had a unpacked BCD value of 00000010 this value would  select entry number '2' in my table data, and return it to the LCD display. As it stands, what ever value I throw at my table it displays all of the data from my table on the LCD .i.e.  1234567890.

My project is based on the pic18f46k20/ds1306 RTC. I am hoping to display the time and date on the LCD.

Many thanks Lester

 Part of my code below:



 NEXT    movlw   high MY_DATA        ; load font1 H address to tbptrH
            movwf   TBLPTRH
            movlw   upper MY_DATA       ; load font1 U address
            movwf   TBLPTRU
            movlw   low MY_DATA         ; load font1 L address to tbptrL
            movwf   TBLPTRL
            movf    TEMP ,W
            addwf   TBLPTRL

            tblrd   *+                      ;read table entry into TABLAT
            movf    TABLAT,w                ;in WREG
            call    SPI    ; get  data and write out
            incf    TEMP
            MOVLW   -.2
            CPFSEQ  TEMP
            goto    NEXT

           RETURN
   

 

ORG 0x500

MY_DATA

       
   
     db 0x3E,0x7F,0x71,0x59,0x4D,0x7F,0x3E,0   ; '0'
     db 0x40,0x42,0x7F,0x7F,0x40,0x40,0x00,0   ; '1'
     db 0x62,0x73,0x59,0x49,0x6F,0x66,0x00,0    ; '2'
     db 0x22,0x63,0x49,0x49,0x7F,0x36,0x00,0    ; '3'
     db 0x18,0x1C,0x16,0x53,0x7F,0x7F,0x50,0    ; '4'
     db 0x27,0x67,0x45,0x45,0x7D,0x39,0x00,0   ; '5'
     db 0x3C,0x7E,0x4B,0x49,0x79,0x30,0x00,0    ; '6'
     db 0x03,0x03,0x71,0x79,0x0F,0x07,0x00,0   ; '7'
     db 0x36,0x7F,0x49,0x49,0x7F,0x36,0x00,0    ; '8'
     db 0x06,0x4F,0x49,0x69,0x3F,0x1E,0x00,0   ; '9'




      END
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: pic18f lookup table problem
« Reply #1 on: January 05, 2015, 10:01:47 pm »
I was wondering if anyone could help me or point me in the right direction.
C
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: pic18f lookup table problem
« Reply #2 on: January 06, 2015, 01:32:07 am »
I think you will find it much easier and more productive coding in a high level language like C.

Assembly is great for simple tasks or experts pushing the envelope of a chip.
================================
https://dannyelectronics.wordpress.com/
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: pic18f lookup table problem
« Reply #3 on: January 06, 2015, 08:59:22 am »
So...   I'm not much of a PIC programmer, but...
Starts with the BCD digit it W?
Code: [Select]
   :
            movwf   TBLPTRL
            movf    TEMP ,W
            addwf   TBLPTRL
Don't you need a multiply-by-8 in there to get the right set of bits?
Code: [Select]
            tblrd   *+                      ;read table entry into TABLAT
            movf    TABLAT,w                ;in WREG
            call    SPI    ; get  data and write out
            incf    TEMP
            MOVLW   -.2
            CPFSEQ  TEMP
            goto    NEXT
I'm not familiar with that "-.2" syntax, but I'm not seeing how this is going to loop 7 times...
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: pic18f lookup table problem
« Reply #4 on: January 06, 2015, 09:37:56 am »
The easiest way to debug something like this is run it in the MPLAB simulator - you don't even need the target device to do this. Put a watch on the variables and see what it's doing.
 

Offline picandmix

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: gb
Re: pic18f lookup table problem
« Reply #5 on: January 06, 2015, 09:59:00 am »
The routine you show is for sending out a LINE of 16 characters to the screen , the original code had a MovLW of 16 for the 16 characters to be sent out.

As the TBLPTRL was incremented by the routines looping then when it got to 16 it would exit the routine.

You have placed -.2  (0xFE) as the value it must reach before it exits the loop.


If you look at that code you will see the routine below this one " glcd_write_character " is the one to use for sending out just one character at a time.
« Last Edit: January 06, 2015, 10:04:38 am by picandmix »
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
 

Offline LesterwyattTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: gb
    • My YouTube Channel
Re: pic18f lookup table problem
« Reply #7 on: January 06, 2015, 08:19:47 pm »
Lesterwyatt is flooding the forum with this asm crap:

https://www.eevblog.com/forum/beginners/table-lookup-problem-%28pic18f%29/msg580899/#msg580899

https://www.eevblog.com/forum/beginners/nokia-lcd-problem/msg578636/#msg578636

Brutte(nice name). what's wrong with ASM? Also what's wrong with posting in a forum for help? What do you use this forum for Brutte? To piss people off I suspect!
 

Offline picandmix

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: gb
Re: pic18f lookup table problem
« Reply #8 on: January 06, 2015, 09:51:03 pm »
As mentioned that code is not easy to follow.

Have a look at the attached code which I have cut down to a bare minimum to take that 'EADOG..' String of data and send it out as screen bytes.

You can see it working by using MPlabs SIMulator and F9 RUN to that Breakpoint  ( or F7 Single step though the code) when it stops and shows the contents of W in the Watch Window, as shown in the jpeg.

All you need to do is take your RTC data and present it into that routine.


Edit,  should have said, regarding sending data to your screen, think the easiest way is to allocate a block of Ram the same size as your screen.
Place all the data you want displaying in to that Ram area  and then send the whole ram section out using one of those other routines.
Even if you only upload  the Ram bank with a changeof just the RTC value,  its easier to send out the whole bank than trying to directly change individual characters on the screen.
« Last Edit: January 06, 2015, 10:01:02 pm by picandmix »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: pic18f lookup table problem
« Reply #9 on: January 07, 2015, 02:04:16 am »
Quote
what's wrong with ASM?

Nothing wrong with asm per se. It is just that as the project's complexity increases, it becomes exponentially more difficult to keep track of asm code pieces and re-use earlier modules.

It is really an excellent language for a simple project or for a pro.
================================
https://dannyelectronics.wordpress.com/
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: pic18f lookup table problem
« Reply #10 on: January 08, 2015, 03:59:03 pm »
Plus the XC8 compiler will deal with constants in program memory for you, so no explicit fannying around with the TBL registers is necessary.

I don't think I've written an entire program in assembler for over ten years at the very least. While it's a very good skill to have, and I look at generated code pretty much daily when debugging, it's only occasionally that I feel the need to actually write any anymore, and even then it only tends to be a couple of dozen lines of inline asm at a pinch point.

But as an academic exercise, I admire your tenacity.
 

Offline LesterwyattTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: gb
    • My YouTube Channel
Re: pic18f lookup table problem
« Reply #11 on: January 11, 2015, 01:09:25 am »
I have managed to display the 'time' 'date' 'year', using ds1306 and a pic18f, ;D  its a little crude but I have done it in ASM.
Thanks for everybody's help.

Lester

 

Offline LesterwyattTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: gb
    • My YouTube Channel
Re: pic18f lookup table problem
« Reply #12 on: January 11, 2015, 01:17:54 am »
Sorry forgot to attach the code.

It may be crude, but I don't care it works!!!

Lester :)

Code: [Select]
;*****************************************************************************
;
; NOKIA 5110 GLCD (48 x 84 PIXELS) FOR PIC18F. DISPLAYS THE TIME AND DATE
; FROM DS1306 RTC ON THE NOKIA 5110 GLCD
; PROGRAM WRITTEN IN ASM
; BY LESTER WYATT 09/01/2015


LIST P=PIC18F46K20
 #include <p18F46K20.inc>

; CONFIG1H
  CONFIG  FOSC = INTIO67        ; Oscillator Selection bits (Internal oscillator block, port function on RA6 and RA7)
  CONFIG  FCMEN = OFF           ; Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor disabled)
  CONFIG  IESO = OFF            ; Internal/External Oscillator Switchover bit (Oscillator Switchover mode disabled)

; CONFIG2L
  CONFIG  PWRT = OFF            ; Power-up Timer Enable bit (PWRT disabled)
  CONFIG  BOREN = SBORDIS       ; Brown-out Reset Enable bits (Brown-out Reset enabled in hardware only (SBOREN is disabled))
  CONFIG  BORV = 18             ; Brown Out Reset Voltage bits (VBOR set to 1.8 V nominal)

; CONFIG2H
  CONFIG  WDTEN = off            ; Watchdog Timer Enable bit (WDT is always enabled. SWDTEN bit has no effect)
  CONFIG  WDTPS = 32768         ; Watchdog Timer Postscale Select bits (1:32768)

; CONFIG3H
  CONFIG  CCP2MX = PORTC        ; CCP2 MUX bit (CCP2 input/output is multiplexed with RC1)
  CONFIG  PBADEN = ON           ; PORTB A/D Enable bit (PORTB<4:0> pins are configured as analog input channels on Reset)
  CONFIG  LPT1OSC = OFF         ; Low-Power Timer1 Oscillator Enable bit (Timer1 configured for higher power operation)
  CONFIG  HFOFST = ON           ; HFINTOSC Fast Start-up (HFINTOSC starts clocking the CPU without waiting for the oscillator to stablize.)
  CONFIG  MCLRE = ON            ; MCLR Pin Enable bit (MCLR pin enabled; RE3 input pin disabled)

; CONFIG4L
  CONFIG  STVREN = ON           ; Stack Full/Underflow Reset Enable bit (Stack full/underflow will cause Reset)
  CONFIG  LVP = ON              ; Single-Supply ICSP Enable bit (Single-Supply ICSP enabled)
  CONFIG  XINST = OFF           ; Extended Instruction Set Enable bit (Instruction set extension and Indexed Addressing mode disabled (Legacy mode))

; CONFIG5L
  CONFIG  CP0 = OFF             ; Code Protection Block 0 (Block 0 (000800-003FFFh) not code-protected)
  CONFIG  CP1 = OFF             ; Code Protection Block 1 (Block 1 (004000-007FFFh) not code-protected)
  CONFIG  CP2 = OFF             ; Code Protection Block 2 (Block 2 (008000-00BFFFh) not code-protected)
  CONFIG  CP3 = OFF             ; Code Protection Block 3 (Block 3 (00C000-00FFFFh) not code-protected)

; CONFIG5H
  CONFIG  CPB = OFF             ; Boot Block Code Protection bit (Boot block (000000-0007FFh) not code-protected)
  CONFIG  CPD = OFF             ; Data EEPROM Code Protection bit (Data EEPROM not code-protected)

; CONFIG6L
  CONFIG  WRT0 = OFF            ; Write Protection Block 0 (Block 0 (000800-003FFFh) not write-protected)
  CONFIG  WRT1 = OFF            ; Write Protection Block 1 (Block 1 (004000-007FFFh) not write-protected)
  CONFIG  WRT2 = OFF            ; Write Protection Block 2 (Block 2 (008000-00BFFFh) not write-protected)
  CONFIG  WRT3 = OFF            ; Write Protection Block 3 (Block 3 (00C000h-00FFFFh) not write-protected)

; CONFIG6H
  CONFIG  WRTC = OFF            ; Configuration Register Write Protection bit (Configuration registers (300000-3000FFh) not write-protected)
  CONFIG  WRTB = OFF            ; Boot Block Write Protection bit (Boot Block (000000-0007FFh) not write-protected)
  CONFIG  WRTD = OFF            ; Data EEPROM Write Protection bit (Data EEPROM not write-protected)

; CONFIG7L
  CONFIG  EBTR0 = OFF           ; Table Read Protection Block 0 (Block 0 (000800-003FFFh) not protected from table reads executed in other blocks)
  CONFIG  EBTR1 = OFF           ; Table Read Protection Block 1 (Block 1 (004000-007FFFh) not protected from table reads executed in other blocks)
  CONFIG  EBTR2 = OFF           ; Table Read Protection Block 2 (Block 2 (008000-00BFFFh) not protected from table reads executed in other blocks)
  CONFIG  EBTR3 = OFF           ; Table Read Protection Block 3 (Block 3 (00C000-00FFFFh) not protected from table reads executed in other blocks)

; CONFIG7H
  CONFIG  EBTRB = OFF           ; Boot Block Table Read Protection bit (Boot Block (000000-0007FFh) not protected from table reads executed in other blocks)

 
        cblock  0x000

        result1

        GWORK2
        GWORK3
        TEMP

        ENDC


         org 0


    MAIN   MOVLW B'0110000'   ;SET PIC CLOCK TO 8 MHZ
           MOVWF OSCCON
           MOVLW D'6'
           MOVWF CNT
           CLRF TRISC
           BSF  TRISC,SDI
           CLRF TRISD
           BSF PORTD,RD6

;-------------REGISTERS FOR TIME AND DATE AND COUNTERS------------

        Dus  EQU D'10'  ;delay byte
        DRus EQU 0x0D  ;delay register
        DAYW    EQU 10H   ;day of week register (mon,tue,wed...)
        MONTH   EQU 11H   ;file reg starting with month
        DAT     EQU 12H   ; day of month(1st 2nd 3rd...)
        YR      EQU 13H   ; year
        HR      EQU 14H   ; hour
        MIN     EQU 15H   ;min
        SEC     EQU 16H   ;sec
        CNT     EQU 20H   ;counter
        CNT1    EQU 23H   ;counter
        TMP     EQU 21H   ; conversion from BCD to ASCII


       



; SPI PORT ALLOCATION    PORT RC5 = SDO
;                        PORT RC4 = SDI
;                        PORT RC3 = SCK
;                        PORT RC2 = CE

; LCD PORT ALLOCATION    PORT RD7 = D/C
;                        PORT RD6 = RST
;                        PORT RD5 = SCE
;                        PORT RC5 = DATA
;
; RTC PORT ALLOCATION    PORT RC4 = SDI
;                        PORT RC5 = SDO
;                        PORT RC3 = SCK
;                        PORT RC2 = CE






LCD_MAIN

         CALL SPI_INT      ;SET UP SPI
         CALL GLCD_RESET  ; RESET ROUTINE FOR LCD
         CALL GLCD_INT    ; SETUP ROUTINE FOR LCD
         CALL SET_TIME    ;SET TIME ON RTC

GLOOP    CALL GET_TIME
         CALL SEND_TIME
         CALL XY
         GOTO GLOOP
         


;----------------Set up and initialize lcd---------

    GLCD_RESET    BCF PORTD,RD5  ;CE = 0
                  CALL DELAY
                  CALL DELAY
                  CALL DELAY
                  BCF PORTD,RD6  ;RESET PULSE
                  CALL DELAY
                  CALL DELAY
                  CALL DELAY
                  BSF PORTD,RD6
                  CALL DELAY
                  CALL DELAY
                  RETURN
;--------SPI INITIALIZE---------------------

SPI_INT  MOVLW 0x00
         MOVWF SSPSTAT ;read on middle dens on active edge
         MOVLW 0x31
         MOVWF SSPCON1 ; SSP  1/16
         RETURN

 
;------------CONTROL SETUP--------------------------------
                     
GLCD_INT      MOVLW 0x21      ;PD=0 V=0 extended function set H=1
              CALL GLCD_COM       
              MOVLW 0xBF      ;VOP set tp 16xvb
              CALL GLCD_COM
              MOVLW 0x04    ;set bias
              CALL GLCD_COM   
              MOVLW 0x14    ;
              CALL GLCD_COM
              MOVLW 0x0C      ;PD=0 V=0 extended function set H=0
              CALL GLCD_COM
              MOVLW 0x20      ;display control normal
              CALL GLCD_COM      ;senD
              MOVLW 0x0C
              CALL GLCD_COM
              CALL XY

              RETURN




        ;----------------RTC SETUP----------------------



SET_TIME BSF PORTC,RC2  ;ENABLE RTC
         CALL DELAY
         MOVLW 0x8F     ;CONTROL REGISTER ADDRESS
         CALL RTC
         MOVLW 0x00     ;CLEAR WP
         CALL RTC
         BCF PORTC,RC2  ;DISABLE RTC
         CALL DELAY

         ;---------SEND (SET) THE TIME FOLLOWED BY DATE

         BSF PORTC,RC2   ;ENABLE RTC
         CALL DELAY
         MOVLW 0x80      ;REGISTER FOR SECONDS
         CALL RTC
         MOVLW 0x00      ; SET FOR 00 SECONDS
         CALL RTC
         MOVLW 0x04      ;SET FOR 04 MIN
         CALL RTC
         MOVLW 0x01      ;SET FOR 01 HR
         CALL RTC
         MOVLW 0x06      ;SET FOR DAY OF WEEK (FRI)
         CALL RTC
         MOVLW 0x09      ;SET FOR 9TH DAY OF MONTH
         CALL RTC
         MOVLW 0x01      ;SET FOR  (JAN)
         CALL RTC
         MOVLW 0x15      ;SET FOR YEAR
         CALL RTC
         BCF PORTC,RC2   ;DISABLE RTC
         CALL DELAY

         RETURN
;-------------GET TIME FROM RTC AND SAVE IN REGISTERS -----------------
   GET_TIME  BSF PORTC,RC2
             CALL DELAY
             MOVLW 0x00   ; SECONDS REGISTER FOR ADDRESS READ
             CALL RTC     ; SEND
             CALL RTC     ;START RECEIVING TIME AND DATE
             MOVWF SEC
             CALL RTC
             MOVWF MIN
             CALL RTC
             MOVWF HR
             CALL RTC
             MOVWF DAYW
             CALL RTC
             MOVWF DAT
             CALL RTC
             MOVWF MONTH
             CALL RTC
             MOVWF YR
             BCF PORTC,RC2
             CALL DELAY
             RETURN


;---------CONVERT PACKED BCD TO ASCII READY FOR DISPLAY ON NOKIA SCREEN--------

SEND_TIME      LFSR FSR0,0x11   ;ADDRESS OF FILE REGISTER FOR TIME AND DATE
               MOVLW D'6'       ;6 BYTES OF DATA TO DISPLAY
               MOVWF CNT        ;SET UO COUNTER
        SND    MOVFF INDF0,TMP  ;DATA FOR HIGH NIBBLE
               MOVLW 0xF0       ;CLEAR LOW NIBBLE
               ANDWF TMP,f      ;KEEP IN TEMP
               SWAPF TMP,f      ;SWITCH HIGH AND LOW NIBBLE
               MOVLW 0x30       ;CONVERT TO ASCII
               IORWF TMP,W      ;PUT IN W
               CALL glcd_write_character   ; SEND TO TABLE READ TO DISPLAY
               MOVFF POSTINC0,TMP ;GET DATA POINT TO NEXT
                MOVLW 0x0FN       ;CLEAR HIGH NIBBLE
                ANDWF TMP,f       ;KEEP IN TMP
                MOVLW 0x30        ;CONVERT TO ASCII
                IORWF TMP,W       ;PUT IN W
                CALL glcd_write_character   ; SEND TO TABLE READ TO DISPLAY
                 MOVLW ':'
                CALL glcd_write_characteR
                DECFSZ CNT                 ;IS IT THE LAST ONE?
                BRA SND                    ;NO
                BRA GET_TIME               ;START AGAIN
               

               RETURN

;----------TRASNMIT TO LCD--------------

        SPI  BCF PORTD,RD5  ;LCD ENABLE

             BSF PORTD,RD7 ;D/C HIGH FOR WRITE
             MOVWF SSPBUF  ;LOAD FOR TRANSFER
        WAIT BTFSS SSPSTAT,BF ;WAIT FOR ALL BITS
             BRA WAIT
             MOVF SSPBUF,W  ;GET THE RECEIVED BYTE
             BSF PORTD,RD5 ;CHIP ENABLE HIGH
             BSF PORTD,RD7 ;D/C HIGH FOR WRITE
             
             RETURN       ;RETURN WITH BYTE IN W


;------------RTC SPI------------

       
        RTC  MOVWF SSPBUF
       WAIT2 BTFSS SSPSTAT,BF
             BRA WAIT2
             MOVF SSPBUF,W
             RETURN



;-------------GLCD SPI----------------------------------

    GLCD_COM  BCF PORTD,RD5 ;CHIP ENABLE LOW FOR WRITE

              BCF PORTD,RD7 ;D/C LOW
              MOVWF SSPBUF
        WAIT1 BTFSS SSPSTAT,BF
              BRA WAIT1
              MOVF SSPBUF,W
              BSF PORTD,RD5 ;CHIP ENABLE HIGH FOR DISABLE
              BSF PORTD,RD7 ;D/C HIGH TO DISABLE CONTROL

              RETURN

;-----------CURSOR PLACEMENT ON GLCD---------------------

           XY  MOVLW 0x9E      ;X = 158
               CALL GLCD_COM
               MOVLW 0x42      ;Y = 66
               CALL GLCD_COM

               RETURN


;---------------------------- DISPLAY A LINE OF TEXT  ------------------
 glcd_page0data  CLRF    TEMP
                 clrf    GWORK3
                MOVWF   TEMP
    gnext_pb1   movlw   high TEMP        ; load font1 H address to tbptrH
                movwf   TBLPTRH
               movlw   upper TEMP       ; load font1 U address
                movwf   TBLPTRU
                movlw   low TEMP         ; load font1 L address to tbptrL
                movwf   TBLPTRL
                movf    GWORK3,W
                addwf   TBLPTRL
                tblrd   *+                      ;read table entry into TABLAT
                movf    TABLAT,w                ;in WREG
                call    glcd_write_character    ; get  data and write out
               incf    GWORK3
                MOVLW   .6
               CPFSEQ  GWORK3
                goto    gnext_pb1

                return

;-------------FIND CHRACTER FROM RTC ASCII DATA AND SENT TO LCD

   
                           
 glcd_write_character   clrf    PRODL
                        clrf    PRODH
                        addlw   -.32                 ; subtract 32 to get value
                        mullw   .6                   ; multipy  value by 8 to get offset valuE
                        movlw   .6                   ; preload data byte counter for 7 bits
                        movwf   GWORK2
                        bcf     STATUS,C             ; clear carry bit
                        movlw   high MY_DATA           ; load font1 H address to tbptrH
                        movwf   TBLPTRH
                        movf    PRODH,W              ; add in any prodH offset value
                        addwf   TBLPTRH,F
                        movlw   upper MY_DATA          ; load font1 U address
                        movwf   TBLPTRU
                        movlw   low MY_DATA           ; load font1 L address to tbptrL
                        movwf   TBLPTRL
                        movf    PRODL,W              ; add ProdL with offset value
                        addwf   TBLPTRL
                        btfsc   STATUS,C             ; has add created a carry over
                        incf    TBLPTRH,F            ; yes, so add 1 to tbptrH
            gnext_pb    tblrd   *+                   ;read table entry into TABLAT
                        movf    TABLAT,w             ;in WREG
                        call    SPI                  ; send data
                        decfsz  GWORK2              ;IF YOU LOOK AT THE WATCH WINDOW YOU CAN SEE EACH BYTE OF
                        goto    gnext_pb            ; THE IMAGE BEING SENT OUT
                                                    ; SHOWN IN w IS 0X41 THE FIRST 'LINE' OF THE CHARACTER 'E'

                        return

;--------------------DELAY ROUTINE-----------------------


             DELAY MOVLW Dus
                    MOVWF DRus
               DS1  DECF DRus,F
                    BNZ DS1
                    RETURN




;----------FOR A LINE OF TEXT---------------------------

gpage0_data

    db "",0           

;---------------------ASCII TABLE------------------------
MY_DATA
     Font1

      DB 0x00, 0x00, 0x00, 0x00, 0x00
      DB 0x00, 0x00, 0x5f, 0x00, 0x00
      DB 0x00, 0x07, 0x00, 0x07, 0x00
      DB 0x14, 0x7f, 0x14, 0x7f, 0x14
      DB 0x24, 0x2a, 0x7f, 0x2a, 0x12
      DB 0x23, 0x13, 0x08, 0x64, 0x62
      DB 0x36, 0x49, 0x55, 0x22, 0x50
      DB 0x00, 0x05, 0x03, 0x00, 0x00
      DB 0x00, 0x1c, 0x22, 0x41, 0x00
      DB 0x00, 0x41, 0x22, 0x1c, 0x00
      DB 0x14, 0x08, 0x3e, 0x08, 0x14
      DB 0x08, 0x08, 0x3e, 0x08, 0x08
      DB 0x00, 0x50, 0x30, 0x00, 0x00
      DB 0x08, 0x08, 0x08, 0x08, 0x08
      DB 0x00, 0x60, 0x60, 0x00, 0x00
      DB 0x20, 0x10, 0x08, 0x04, 0x02
      DB 0x3e, 0x51, 0x49, 0x45, 0x3e
      DB 0x00, 0x42, 0x7f, 0x40, 0x00
      DB 0x42, 0x61, 0x51, 0x49, 0x46
      DB 0x21, 0x41, 0x45, 0x4b, 0x31
      DB 0x18, 0x14, 0x12, 0x7f, 0x10
      DB 0x27, 0x45, 0x45, 0x45, 0x39
      DB 0x3c, 0x4a, 0x49, 0x49, 0x30
      DB 0x01, 0x71, 0x09, 0x05, 0x03
      DB 0x36, 0x49, 0x49, 0x49, 0x36
      DB 0x06, 0x49, 0x49, 0x29, 0x1e
      DB 0x00, 0x36, 0x36, 0x00, 0x00
      DB 0x00, 0x56, 0x36, 0x00, 0x00
      DB 0x08, 0x14, 0x22, 0x41, 0x00
      DB 0x14, 0x14, 0x14, 0x14, 0x14
      DB 0x00, 0x41, 0x22, 0x14, 0x08
      DB 0x02, 0x01, 0x51, 0x09, 0x06
      DB 0x32, 0x49, 0x79, 0x41, 0x3e
      DB 0x7e, 0x11, 0x11, 0x11, 0x7e
      DB 0x7f, 0x49, 0x49, 0x49, 0x36
      DB 0x3e, 0x41, 0x41, 0x41, 0x22
      DB 0x7f, 0x41, 0x41, 0x22, 0x1c
      DB 0x7f, 0x49, 0x49, 0x49, 0x41
      DB 0x7f, 0x09, 0x09, 0x09, 0x01
      DB 0x3e, 0x41, 0x49, 0x49, 0x7a
      DB 0x7f, 0x08, 0x08, 0x08, 0x7f
      DB 0x00, 0x41, 0x7f, 0x41, 0x00
      DB 0x20, 0x40, 0x41, 0x3f, 0x01
      DB 0x7f, 0x08, 0x14, 0x22, 0x41
      DB 0x7f, 0x40, 0x40, 0x40, 0x40
      DB 0x7f, 0x02, 0x0c, 0x02, 0x7f
      DB 0x7f, 0x04, 0x08, 0x10, 0x7f
      DB 0x3e, 0x41, 0x41, 0x41, 0x3e
      DB 0x7f, 0x09, 0x09, 0x09, 0x06
      DB 0x3e, 0x41, 0x51, 0x21, 0x5e
      DB 0x7f, 0x09, 0x19, 0x29, 0x46
      DB 0x46, 0x49, 0x49, 0x49, 0x31
      DB 0x01, 0x01, 0x7f, 0x01, 0x01
      DB 0x3f, 0x40, 0x40, 0x40, 0x3f
      DB 0x1f, 0x20, 0x40, 0x20, 0x1f
      DB 0x3f, 0x40, 0x38, 0x40, 0x3f
      DB 0x63, 0x14, 0x08, 0x14, 0x63
      DB 0x07, 0x08, 0x70, 0x08, 0x07
      DB 0x61, 0x51, 0x49, 0x45, 0x43
      DB 0x00, 0x7f, 0x41, 0x41, 0x00
      DB 0x02, 0x04, 0x08, 0x10, 0x20
      DB 0x00, 0x41, 0x41, 0x7f, 0x00
      DB 0x04, 0x02, 0x01, 0x02, 0x04
      DB 0x40, 0x40, 0x40, 0x40, 0x40
      DB 0x00, 0x01, 0x02, 0x04, 0x00
      DB 0x20, 0x54, 0x54, 0x54, 0x78
      DB 0x7f, 0x48, 0x44, 0x44, 0x38
      DB 0x38, 0x44, 0x44, 0x44, 0x20
      DB 0x38, 0x44, 0x44, 0x48, 0x7f
      DB 0x38, 0x54, 0x54, 0x54, 0x18
      DB 0x08, 0x7e, 0x09, 0x01, 0x02
      DB 0x0c, 0x52, 0x52, 0x52, 0x3e
      DB 0x7f, 0x08, 0x04, 0x04, 0x78
      DB 0x00, 0x44, 0x7d, 0x40, 0x00
      DB 0x20, 0x40, 0x44, 0x3d, 0x00
      DB 0x7f, 0x10, 0x28, 0x44, 0x00
      DB 0x00, 0x41, 0x7f, 0x40, 0x00
      DB 0x7c, 0x04, 0x18, 0x04, 0x78
      DB 0x7c, 0x08, 0x04, 0x04, 0x78
      DB 0x7c, 0x14, 0x14, 0x14, 0x08
      DB 0x08, 0x14, 0x14, 0x18, 0x7c
      DB 0x7c, 0x08, 0x04, 0x04, 0x08
      DB 0x48, 0x54, 0x54, 0x54, 0x20
      DB 0x04, 0x3f, 0x44, 0x40, 0x20
      DB 0x3c, 0x40, 0x40, 0x20, 0x7c
      DB 0x1c, 0x20, 0x40, 0x20, 0x1c
      DB 0x3c, 0x40, 0x30, 0x40, 0x3c
      DB 0x44, 0x28, 0x10, 0x28, 0x44
      DB 0x0c, 0x50, 0x50, 0x50, 0x3c
      DB 0x44, 0x64, 0x54, 0x4c, 0x44
      DB 0x00, 0x08, 0x36, 0x41, 0x00
      DB 0x00, 0x00, 0x7f, 0x00, 0x00
      DB 0x00, 0x41, 0x36, 0x08, 0x00
      DB 0x10, 0x08, 0x08, 0x10, 0x08
      DB 0x78, 0x46, 0x41, 0x46, 0x78






      END
   
 

Offline picandmix

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: gb
Re: pic18f lookup table problem
« Reply #13 on: January 12, 2015, 10:11:50 am »
Sent you 3  replies to your PMs regarding the code in the last 2 days but they do not show up in my Sent Box.
Not sure if thats because you have not opened them or there was a problem sending them out.

Can you have a look in your PM folder and let me know if they are there with the code I sent back.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf