Nokia COLOR LCD PicBasicPro 2.50a example code


Closed Thread
Results 1 to 40 of 50

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    And i guess they're not going to appreciate faster communication with the MSSP as well?

    but 6 screen/second is a bit more than enough... unless you read really fast
    Steve

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

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    And i guess they're not going to appreciate faster communication with the MSSP as well?
    That's why I never bothered rewriting the code to use the MSSP, just wasn't worth the code space and/or effort at the time.
    The LCD spec's at 6Mhz SPI rate, but I can't seem to get it much higher than 2.5Mhz. Probably an extra Tcycle delay somewhere in the datasheet that I missed. Might need to have a small delay after each byte or group of bytes is sent or something. Don't know, don't care, works for me.

    And working from that same rate of 6 screen refreshes per second...
    With straight text, I can send about 2K characters per second to the screen, actually a bit more.
    Plenty fast...
    Last edited by skimask; - 15th April 2008 at 17:55.

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

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

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

  6. #6
    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)....

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

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

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