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 Trying to Fit the Lib on a 16F877

    Hi Skimask,

    I just received my Color LCD and the breadboard from SparkFun.

    I´m trying to convert your source code to run on a 16F877 (8 Kb, 368 byts of RAM, 256 bytes of EEPROM)
    I´m doing that just because I can not find the 18F4620 here in Brazil.

    So, I did some modifications as you suggested :

    1) Changed de OSC to 10 (Mhz)

    2) The line :
    clcdENDFLASH con $FFFF 'IMPORTANT - change this value to the size of the PICs program space - 1
    was changed to :
    clcdENDFLASH con $1FFF 'IMPORTANT - change this value to the size of the PICs program space - 1

    3) At the end of the code, the Org value was changed to org 0x1F60

    4) Removed the 13 last lines used for the modified ASCII characters

    But, when I try to compile, the PBP returns some strange error messages :

    Warning[207] d:\teste_~1\nokia~2.asm 188 : Found Label after column 1. (bra)
    Error[122] d:\teste_~1\nokia~2.asm 188 : Illegal opcode (clcdoverstr)
    Message[303] d:\teste_~1\nokia~2.asm 190 : Program word too large. Truncated to core size (5465)
    Message[303] d:\teste_~1\nokia~2.asm 190 : Program word too large. Truncated to core size (7374)
    Message[303] d:\teste_~1\nokia~2.asm 190 : Program word too large. Truncated to core size (7472)
    Message[303] d:\teste_~1\nokia~2.asm 190 : Program word too large. Truncated to core size (696E)
    Message[303] d:\teste_~1\nokia~2.asm 190 : Program word too large. Truncated to core size (6723)

    I don´t understand why the code doesn´t fit in my 877, since the same source compiled for the 18F4620 takes less than 3 Kb...

    Do you have any idea or any tip to fit it on a 877 ?

    Thank you !

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by srspinho View Post
    I´m doing that just because I can not find the 18F4620 here in Brazil.
    They're available practically everywhere else in the world... You've obviously got internet access...Get one...

    Warning[207] d:\teste_~1\nokia~2.asm 188 : Found Label after column 1. (bra)
    Error[122] d:\teste_~1\nokia~2.asm 188 : Illegal opcode (clcdoverstr)
    Because there isn't a 'bra' opcode in the 16F877. The 2nd error is probably a result of the first.
    Change the bra to goto in the macro and see what happens...

    Message[303] d:\teste_~1\nokia~2.asm 190 : Program word too large. Truncated to core size (5465)

    I don´t understand why the code doesn´t fit in my 877, since the same source compiled for the 18F4620 takes less than 3 Kb...
    There's a number of different reasons. 18F registers don't multiple bank bit setting instructions every time you want to access a variable, 16F's do. Every time you want to access a register in an 18F, you just access it, period. With the 16F, you have to set either 1,2, or 3 bank bits first, then you can access it. So, for every variable access with an 18F, one word, for every variable access with a 16F, could be up to 3 instructions just to get to it. (see section 2.4 of the 16F877A datasheet and/or section 5 of the 18F4620 datasheet)

    16F877 or 16F877A?

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


    Did you find this post helpful? Yes | No

    Default

    CHK?RP do it for you

    16F compile results is in WORDS while 18F is in BYTES
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    Thank you guys !

    well, I´m trying to buy the 4620 from the Brazilian Microchip official vendor. They say that the 4620 is not an usual item (?) and they have to import it and it will take a long time.

    So, I decided to move my project to a 4550. I think this model will do the job.

    Thank you again !

    Regards

    Sérgio

  5. #5
    Join Date
    Mar 2008
    Location
    Gerogetown, Texas
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    srspinho

    Here is some code for the same display. I used some of Skimask's code for text manipulation. I am also sending pictures via USB from the PC. You will also see an encoder input to adjust the contrast of the display. Hope it helps.

    Dave
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    Thank you Dave !

    sure it will help !

    Just a doubt : What PIC have you used with this code ?

    Finally, today I will receive my first 18F´s (one 18F4550 (really expensive) and 2 18F2520).

    Thank you again !

  7. #7
    Join Date
    Mar 2008
    Location
    Gerogetown, Texas
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    srspinho

    I use 18F4550 with USB boot-loader (slightly modified). I also made a VB6 program to send color pictures to the display via USB. If you are interested I can send you all the source codes.

    Dave

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