Nokia lcd include , small footprint to suit pic16's


Closed Thread
Results 1 to 40 of 111

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    I had no display until changing TRISA from %10010000 to all outputs
    correct I failed to make the LCD_RST pin an output , all the "LCD" pins need to be digital outputs.
    my code did not work after a power cycle , the disp was keeping its config from previous code so resets never happened
    it all looked good while the power was still applied.


    When I add LCD_LIGHT = 1 in the mix I have no text displayed.

    LCD_LIGHT = 1 is backlight off. LCD_LIGHT = 0 is backlight on
    if it does anything else then check your wiring , or it may be a power problem
    Warning I'm not a teacher

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    found a problem , the init subroutine needs to pause a bit after the rst pulse otherwise display may not initialise properly

    Code:
    lcd_init:
        @ GLetAddress _font7x5,_glcdFont
        bigtxt = 0
        inverted =0
        #ifdef use_mssp 
        SSP1CON1=$21  ;$22,21,20 all work @32mhz  20 is fastest 
        SSP1STAT=$40
        #endif
        LCD_CE=1 
        pause 30 
        Lcd_RST = 0         ' Reset LCD (HW reset)
        pause 1
        Lcd_RST = 1         ' Release Reset
        pause 1     ;add this pause
    '    lcd_dc=0
        LCDCMD   $21        ' LCD EXTENDED COMMANDS
        LCDCMD   $c8        ' SET LCD Vop (CONTRAST) initial value $C8 = 200.
        LCDCMD   $06        ' SET TEMP COEFFICIENT
        LCDCMD   $13        ' LCD BIAS MODE
        LCDCMD   $20        ' LCD STANDARD COMMANDS
        LCDCMD   $08        ' LCD blank
        LCDCMD   $0c        ' LCD IN NORMAL MODE
    return
    Warning I'm not a teacher

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    turns out that testing the bit vars "inverted" and "bigtext" was not always working after the asm section in gcga subroutine .this only shows up when some vars are pushed out of bank 0 .I can not establish the failure mechanism ,seems i'm just guessing what "CHK?RP" AND "RST?RP" macros actually do . I can't find their definitions anywhere . making the vars into bytes and manually setting correct bank fix the issue.
    here is a more complex demo and an amended nokia include file to test and overcome this issue
    Attached Files Attached Files
    Warning I'm not a teacher

  4. #4
    Join Date
    Jun 2005
    Location
    West Australia
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    Hi Richard,

    I have compile errors with your new code, NB I've renamed them to NOKIA_DEMO#6 to avoid confusion with previous versions:
    [ERROR] nokia_demo#6.pbp (184) : Syntax error
    [ERROR] nokia_demo#6.pbp (195) : Syntax error
    [ERROR] nokia_demo#6.pbp (195) : Redefiniton of LABEL RJUSTBUFF

    which is:
    Code:
        RJUSTBUFF  buff,4        ;http://support.melabs.com/forum/picbasic-pro-compiler-3-0-and-later/usercommand/983-strtok-usercmd
        RJUSTBUFF  buff,2   ;http://support.melabs.com/forum/picbasic-pro-compiler-3-0-and-later/usercommand/983-strtok-usercmd
    What have I missed?

    Regards,
    Bill
    Attached Files Attached Files

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    What have I missed?
    you can't use my RJUSTBUFF user command unless you include the file that defines it .

    it can be found at the link in the comment ,its included with the strtok code


    http://support.melabs.com/forum/picb...strtok-usercmd
    Warning I'm not a teacher

  6. #6
    Join Date
    Jun 2005
    Location
    West Australia
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    Hi Richard,

    Excellent work, thank you. I found my problem - the "strtok.pbpmod" Inc file I used was the older version, somehow I missed the update further down the page on that link.

    All works well, now I need to get my head around how you've performed the magic and modify the code to suit my layout and various pages of information shown on the Nokia display.

    Once again many thanks for the help, you are indeed an asset to the forum.

    Cheers,
    Bill

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    somehow I missed the update further down the page on that link.
    because I forgot to post it
    Warning I'm not a teacher

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. 16F946 pcb footprint (64 tqfp)
    By nomad in forum Schematics
    Replies: 2
    Last Post: - 8th September 2009, 11:14
  3. small 2X16 LCD
    By Ron Marcus in forum Off Topic
    Replies: 2
    Last Post: - 26th October 2007, 20:37
  4. Nokia 3310 LCD
    By barkerben in forum General
    Replies: 3
    Last Post: - 10th December 2005, 19:08
  5. Small LCD module,character
    By Ron Marcus in forum Off Topic
    Replies: 6
    Last Post: - 27th November 2005, 18:13

Members who have read this thread : 3

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