Using Nokia LCD


Closed Thread
Results 1 to 40 of 301

Thread: Using Nokia LCD

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by fratello View Post
    The code is full functionaly ! The graphics it's disable... If try to improve the way that "look" the display, it is no more space in memory...I think the solution it's to 'up-grade' to another PIC, with bigger memory !
    I feel if one could write straight in assembly language, it would be smaller, in size. my comments may not suite the site s it is meant for promoting BASIC
    Regards,
    Sarma

  2. #2
    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

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mvs_sarma View Post
    I feel if one could write straight in assembly language, it would be smaller, in size. my comments may not suite the site s it is meant for promoting BASIC
    Hi Sarma,
    Certainly well written assembly code should use less space than assembly generated by a high level compiler, it all boils down to cost. If you live where the cost of living is very low and software engineers are paid little, assembly may be the correct path. If you live where everything costs way too much and software engineers start out at $50,000 and go way up from there, it becomes very difficult to recover that cost by saving $0.15 on the wholesale cost of the PIC. One other consideration in both instances, if the engineer uses the high level compiler, the time saved will be used to engineer more products. So IMHO, the way to achieve best overall results is High Level compiler WITH assembly assists, I E . . . Darrels Instant interrupts for example. As for your comments . . . Your comments are welcome here. We all benefit by sharing our Ideas and opinions, and we can keep them after sharing or adopt new ones, I believe it was Albert Einstein who said, " all knowledge is trial and error", which is to say the things you are taught are the result of somebody's mistakes.
    Regards,
    Joe S.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    Hi to all !
    Me again...with one new problem : I write the code attached, for 16F648A, because I want to display some graphics elements (see sus, rand 1, rand 2, rand 3, rand 4, jos) .But when I put the code in Microcode Studio I receive the message "Warn : Test_648.asm 790:[102] code crosses boundary @ 800h". I think the code it's too big; please give me some solution !!! I want that my display having one nice 'looking' and without the parts for graphics elements...What can I do ?
    Thanks in advance !
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    That is just a warning that you are crossing a boundary. All is good. How many bytes does it say you are using the lower left of microcode studio?
    http://www.scalerobotics.com

  6. #6
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    This is what MicroCode Studio say :
    Attached Images Attached Images  

  7. #7
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Post

    Quote Originally Posted by fratello View Post
    This is what MicroCode Studio say :
    Your code compiles OK (2932 words used). I don't understand what can be wrong with your setup? If you close and restart the MicroCode Studio, would that help? At least sometime that has helped me.

    To get rid of "code crosses boundary" goto tool bar:
    View -> Editor Options...
    In General sheet, select "Disable 'code crosses boundary' ASM warning.

    BR,
    -Gusse-
    Last edited by Gusse; - 5th May 2009 at 14:59.

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    The first one is about your config fuse. intrc_osc should be replaced by
    Code:
    INTRC_OSC_NOCLKOUT
    This one use the same config fuses as 16F628A & 16F627A. The complete list is in M16F62XA.inc file in pbp\inc folder.

    The second one is just a warning,
    http://picbasic.co.uk/forum/showthread.php?t=555&

    Can be bypass within MicroCode Studio.
    http://www.picbasic.co.uk/forum/show...66&postcount=2

    EDIT: Gusse, that's what happen when few people think the same thing at the same time
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    Code is OK. May be you need a restart.

    Steve, the define is OK. It exists this too!

    Ioannis

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 : 1

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