Nokia COLOR LCD PicBasicPro 2.50a example code


Closed Thread
Results 1 to 40 of 50

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Hi Skimask,

    about one year ago I bought SparkFun´s Nokia COlo LCD + Adapter Board (plus aditional connectors). The board is nice, but the Connector soldered into it is really fragile. after some use, the connector broke up and I had to solder a new one on the board. An Advice for new buyers : use a double-sided tape to hold your display on the board.

    After some fails trying to put it working (just got de backlight on and nothing) I gave up for a while.

    I was using a 16F877 @ 10 Mhz justo to make some testes.

    Last Monday I saw your post here. So, I got it and tried to compile it (setting the MCSP to work with the 18F4620), but got some errors due to some missing variables, like "font", "digcount" and "offset" for example.

    Is this source to be used as an Include and I have to do some work to complement it or I am missing something else ?

    I´m sorry for this stupid (?) question...

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by srspinho View Post
    Last Monday I saw your post here. So, I got it and tried to compile it (setting the MCSP to work with the 18F4620), but got some errors due to some missing variables, like "font", "digcount" and "offset" for example.
    Is this source to be used as an Include and I have to do some work to complement it or I am missing something else ?
    I´m sorry for this stupid (?) question...
    That's what I get for shaving down another program and posting it, in a hurry no less...
    I'll check what I posted and get a new file up there when I get a chance...figure by the weekend for sure.

    In the meanwhile,

    font var byte[1024]
    used to hold the whole font which is copied out of eeprom into internal ram. If your PIC doesn't have 1024 available RAM, you can't use this example. In fact, your PIC MUST have 1024 RAM and at least 512 EEPROM available. When I get a chance, I'll post a 2nd version that won't require copying the font out of EEPROM, thereby won't require 1024 free ram.

    digcount var byte
    used in the clcddigout routine to output a number, sorta like "lcdout DEC variable"
    if the number in the variable is $ffff, and you used digcount = 5, the output will be 65535, if you used digcount = 4, the output will be 5535, digcount = 2, output will be 35, and so on.

    offset var byte
    used in the clcddigout routine to specify a starting digit to output,
    offset=0 means the whole thing,
    offset=1 means starting from the 10's digit,
    offset=2 means starting from the 100's digit, and so on...

    Let me know if/when you get it working for you...and like I said, I'll double-check that file I posted.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Re-Post of the code in Post #1...with a few fixes and more comments...
    (again, untested, I'm not at my home PC, but it should be good as long as you've got your LCD hooked up correctly)
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Hi SkiMask,

    thank you !

    I´m trying to find a 18F with 1024 bytes of Ram and 512 bytes of eeprom here in Brazil (no success yet . . .)

    I think I´ll need to reduce the amount of available ASCII characters and use a smaller PIC than 18F4620.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by srspinho View Post
    Hi SkiMask,
    thank you !
    I´m trying to find a 18F with 1024 bytes of Ram and 512 bytes of eeprom here in Brazil (no success yet . . .)
    I think I´ll need to reduce the amount of available ASCII characters and use a smaller PIC than 18F4620.
    Reducing the character set might work, you'll have to figure out how many characters you can support and change MAXCHAR to fit (5 bytes per character, the font follows the ASCII standard fairly closely).

    I guess I'll work on rewriting the code again to put the character set into program memory.
    That way all that'll be needed is a few bytes of ram for parameter support, about 1K of program space, and some space for the supporting code itself. Should be able to fit that into practically any PIC ('cept for the 10F series, not enough pins )

    Which PIC are you using in particular at the moment right now as it stands at this time ?

  6. #6
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Hi Skimask,

    well, the unique 18F i have at home right now is the 18F2520.

    I have, also a lot of 16F877 and 876 (pretty small for this application isn´t it ?)

    My first tests (long time ago) were done in a 877 when I just try to set pixels on / off

    I think I did something really wrong in the LCD initialization.

    Another doubt : The LCD´s datasheet says that it works with 3.3 v but, the pic and it´s ports works with 5 V is there any problem on hooking up the LCD´s data pins directly to the PIC running with 5Volts ?

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by srspinho View Post
    Hi Skimask,
    well, the unique 18F i have at home right now is the 18F2520.
    I have, also a lot of 16F877 and 876 (pretty small for this application isn´t it ?)
    My first tests (long time ago) were done in a 877 when I just try to set pixels on / off
    I think I did something really wrong in the LCD initialization.
    Another doubt : The LCD´s datasheet says that it works with 3.3 v but, the pic and it´s ports works with 5 V is there any problem on hooking up the LCD´s data pins directly to the PIC running with 5Volts ?
    I think it'll run just fine, even inside a 12Fxxx, once I modify the code to put the basic font in program memory. Sure, it would be limited in what you can see on the screen, but it should work.

    3.3v vs. 5v. - I'm using the Sparkfun adapter board shown in the link in Post#1. I put a 100ohm series resistor inline with each of the control/data lines. Seems to work ok. The 3.3v line is getting an actual 3.3v thru a LDO regulator tapped off the PIC 5v. At first I was running it from 5v thru 3 diodes for a ~1.8v drop for the LCD power, giving about 3.2v on the output. It's still alive. And it's even still alive after literally thousands of improper power downs. The LCD controller datasheet says you should power it down in a specific sequence. I've just been killing power, again, seems to work.
    And I'm connected to the 6 pin header at the one end, with a 100uF elec. cap across Vdisp and ground at the other end.

  8. #8
    diegoulman's Avatar
    diegoulman Guest


    Did you find this post helpful? Yes | No

    Default Re: Nokia COLOR LCD PicBasicPro 2.50a example code

    HELLO, anyone is aware that nokia6101 lcd controller has it, 5200, this file is used for this lcd? I think it is compatible with the 6100, Best regards diego
    Last edited by diegoulman; - 28th September 2011 at 01:47. Reason: aviso de correo

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. PicBasicPro Code help!
    By michel in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th June 2008, 15:43

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