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 guys,

    6 pages / Second ?

    I´m starting to think that´s something wrong with my tests...

    First, the init process takes around 40 seconds (?), so, the screen lights up with a random pattern (white background with random colored dots).

    The speed is pretty far from what Skimask and Dave got on their tests.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Random dots - pretty much normal. I get them every time, but the screen is usually cleared straight away so I don't see but a flicker upon startup.
    Speed out in the weeds - maybe... 18F is probably a bit less than twice as efficient as a 16F at the same clock speed. You're running 20Mhz vs. 40Mhz. Still that's only 4x difference at the very most.
    The init process on my setup takes about 2 seconds, give or take...and that's a big give or take...
    Me thinks you've got something wrong with your OSC settings...
    Time for a 1 second blinky LED test...
    Just a thought here...
    40 seconds to start up..............
    DEFINE'd OSC 20Mhz vs DEFINE'd OSC 40Mhz, 2x difference = 4 seconds
    PIC18F vs PIC16F, 2x difference = 8 seconds
    Actually running at 4Mhz vs. 20Mhz... 5x difference = 40 seconds...
    2 x 2 x 5 = 20x difference = 40 seconds vs 2 seconds...
    Something to think about...
    Last edited by skimask; - 15th April 2008 at 20:54.

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


    Did you find this post helpful? Yes | No

    Default

    Hi Skimask,

    actually, I'm using a 18F2520 with a 20 Mhz ressonator and a DEFINE OSC 20 at the begining.

    The data Sheet says that the clock runs at 4x by default. It means that I can use a 10 Mhz crystal with a DEFINE OSC 40 ?

    I'm going to do some changes in the source code and try to check what's happening.

    Regards.

    Sérgio

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    What I was getting at was that maybe you should run a test blinking an LED, one second on, one second off, make sure your OSC is actually running at 20Mhz. If you've define'd it correctly, and your CONFIG is correct, it'll blink once per second.
    If your define doesn't work, and it's running at 20Mhz, it'll blink 5x per second.
    If your define is correct, and you're running on the internal 4Mhz or something, it'll blink something like once every 5 seconds.

    10Mhz running 40Mhz...
    Re-Read the datasheets...
    Enabling the 4XPLL allows the PIC to effectively multiply some clock sources by 4x, 10Mhz crystal w/ 4xPLL enabled = 40Mhz internal. 4Mhz internal + 4xPLL = 16 Mhz internal.

    Or, you might be talking about the instruction rate.
    The instruction rate is the effective clock rate /4. Each instruction takes 4 clock cycles to execute. If you're running a 20Mhz oscillator, the PIC will execute instructions at the rate of 5 million per second (except for double cycle instructions like jumps, branches, skips, returns, etc)....

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


    Did you find this post helpful? Yes | No

    Default

    Thank You Skimask !

    I will check all your suggestions this weekend, since I'm going on a busines travel tomorrow (not related to electronics...)

    thank you again.

    Sérgio

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


    Did you find this post helpful? Yes | No

    Default

    HPWM, PAUSEUS, HSEROUT a scope are some tricks
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    mister-e

    The converter I am using is NOKIA 6100 BMP Converter v1 I found it at http://www.picbasic.org/forum/showthread.php?t=8649

    Also, as far as speed is concerned, a full picture rendering via USB using eight byte buffers was very slow. I increased the buffer size to 64 bytes and it now loads a picture fairly fast.

    Dave

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    I never did get that BMP converter to work right...but I didn't try very hard...

    USB buffer - oh yeah...way less overhead with 64 bytes. I suppose once you get a buffer size much bigger, the speed doesn't increase so much......that whole 'law of diminishing returns' thing.

    Is your code based on the 8 bit color coding?

    I'm in the process of rewriting some code to incorporate the full 262K color mode (18 bit). It'll kill performance by a factor of at least 3, but it'll be cool....right?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by DaveC3 View Post
    mister-e
    The converter I am using is NOKIA 6100 BMP Converter v1 I found it at http://www.picbasic.org/forum/showthread.php?t=8649
    Thanks Dave
    Steve

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

  10. #10
    Join Date
    Nov 2008
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    I just bought a Nokia Color knock-off lcd from sparkfun. I am using a pic 18f452 at 4Mhz and pic basic pro compiler and the LCD has a green board (Epson). So far I got it to initialize and all I am trying to do is clear the LCD since its all random pixels when the screen turns on. I have it running in 12bit mode, and I can select every pixel and make them white.

    The problem is when I choose any other color like green or red or
    anything other then $FFF. The screen begins the clearing process but it
    gets stuck mid way threw at different locations every time.. Its like the LCD freezes. I have read the forums and did lots of searching and heard of someone else with the same problem but no one knew how to fix it. Also, when i change the OSC to 20 or 40 Mhz, the lcd never works. I hook up everything to an oscilloscope and I can see the data, but the LCD dosn't even blink.. Could there be something wrong with the controller? Or am I missing something. I was wondering if someone could shine some light on this problem. Thank you.

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


    Did you find this post helpful? Yes | No

    Default

    Try feeding data to it a little slower, maybe you are overrunning it's input buffer.
    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.

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