Using Nokia LCD


Results 1 to 40 of 301

Thread: Using Nokia LCD

Threaded View

  1. #11
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    I found out how to add variables to my macro, so now using the include file, you can print any variable to the lcd by using:

    @ PrintVar x,y, _anyvariablehere

    (instead of loading a specific variable , then using @ PrintVar that I had before). Small change, but I figured it might help someone.

    Here is the segment of the macro that is part of the lcd_3310v31 include file (attached).
    Code:
    '@ PrintVar macro function 
    'format should look like this: @ PrintVar x,y, _anyvariable
    ASM
    PrintVar macro x, y, Variable ;input values from: @PrintVar 0,1, _any_variable  
        local OverVar                
        goto OverVar                
    OverVar
        MOVE?CB  x, _PosX           ;move x from above statement to PosX
        MOVE?CB  y, _PosY           ;move y from above statement to PosY
        MOVE?WW  Variable, _VarData ;move variable in statement to VarData
        L?CALL   _VariableOut       ;call VariableOut function
        endm
    ENDASM
    
    VariableOut:
        @ bcf _digits
        for n = 4 to 0 step -1        'cycles through all possible digts of number
            Gosub Lcd_GotoXY          'place character at position PosX and PosY
            Lcd_Data = (VarData dig n) + 48 'digit number n to character str format
            if Lcd_data = 48 and digits = 0 then SkipChar 'skip if first char is 0
            @ bsf _digits             ;show that one character has been printed
            gosub Lcd_SendChar        'print char to screen
            PosX = PosX + 6           'next x position for character
    SkipChar:        
        next n
    return
    Attached Files Attached Files
    http://www.scalerobotics.com

Similar Threads

  1. Nokia COLOR LCD PicBasicPro 2.50a example code
    By skimask in forum Code Examples
    Replies: 49
    Last Post: - 28th September 2011, 01:43
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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