My "Library" for ST7920 Graphical displays, works fine, but...


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: My "Library" for ST7920 Graphical displays, works fine, but...

    But since in most PICs, on-chip eeprom is limited to 128 or 256 bytes
    Would 1K of EEPROM be enough for what you're doing?

    If so, switch to a pic18, like an 18F26K22. It'll be MUCH faster than trying to read from an I2C EEPROM.

  2. #2
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: My "Library" for ST7920 Graphical displays, works fine, but...

    24C256 is 32KB EEPROM.
    So I'm using it, because I need that much amount of font/graphics data

  3. #3
    Join Date
    Aug 2011
    Posts
    453


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: My "Library" for ST7920 Graphical displays, works fine, but...

    In that case, if you're looking for speed then an I2C EEPROM isn't the best of choices.

    I have no idea how slow the bit-banged I2CREAD is (probably pretty slow).
    A 24C256 isn't all that slow, but you're going to be limited to about 400KHz using the pic's MSSP hardware.
    That means a random read operation works out to something like 120us/byte @ 400KHz.

    A faster choice would be an SPI EEPROM like a 25LC512. There you'll probably be able to get the MSSP to run at 8MHz,
    which would speed up the random read to about 5-10us/byte.

    If you can read more than 1 byte at a time then the operations are a bit faster, but Henrik's suggestion of using program memory would be faster.

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


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: My "Library" for ST7920 Graphical displays, works fine, but...

    9x2x8 lcd "command delays" per text line is probably the worst delay
    your snippet lacks that exact detail


    the st7920 chip has a spi i/f that's a little faster and uses less pins too

    there are better methods, at least use a graphics row buffer

    even unpacking a "DA" packed font from flash is fasted than bit banged i2c by a large margin


    this example uses 16 byte row data transfers for either i/f [way more efficient]
    http://www.picbasic.co.uk/forum/showthread.php?t=24218
    post# 26/27
    Warning I'm not a teacher

  5. #5
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: My "Library" for ST7920 Graphical displays, works fine, but...

    Thanks everyone.
    So let's answer step by step.
    There are no significant delays with ST7920 itself nor SPI should be used for it. I'm looking for best compatibility, and with LCDOUT it works like charm. When reading data from built-in eeprom of PIC16F886, I can update whole, 144x32 pixels screen at 20 fps. That's fully enough.
    Regarding the SPI flash, I tried to use 25xx series, but was not able to connect to it via PBP. And by the way, as I know, there is no direct support for hardware MSSP in PBP, so it will be slow as I2C, or I have to use some large inserts on ASM or whatsoever, which will be again limitation in available hardware, like need for PIC18 series, while my code above can be used even on 16F628A.
    Maybe I should use some old style, parallel eeprom, like ones used in old motherboards?

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: My "Library" for ST7920 Graphical displays, works fine, but...

    Oh, you don't want to limit yourself to the hundreds of available 18F series devices so your contemplating using old parallell I/F EEPROMs instead, needing so many I/O-lines that you'll probably have less PICs to choose from than if you went with an 18F series device in the first place. And of those devices that DO have enough pins 75% probably are 18F series anyway.

    Also, a cheap 32k x 8 parallell EEPROM is like €14 while a cheap SPI FLASH with less than €1 (and has 4 times the amount of space).

    You don't need assembly to use the MSSP module.

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: My "Library" for ST7920 Graphical displays, works fine, but...

    Oh, you don't want to limit yourself to the hundreds of available 18F series devices so your contemplating using old parallell I/F EEPROMs instead, needing so many I/O-lines that you'll probably have less PICs to choose from than if you went with an 18F series device in the first place. And of those devices that DO have enough pins 75% probably are 18F series anyway.

    Also, a cheap 32k x 8 parallell EEPROM is like €14 while a cheap SPI FLASH is less than €1 (and has 4 times the amount of space).

    You don't need assembly to use the MSSP module.

  8. #8
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: My "Library" for ST7920 Graphical displays, works fine, but...

    The main difference between us is the sourcing capabilities
    I'm buying everything from china, so I'm paying about 3 cents for 24C256 and parallel eeprom is somewhere around 40 cents. I guess, I can tolerate the difference But for PICs, 2nd hand 16F886 is about 70 cents, and 2nd hand 18F4550 is about $4, that is already a difference
    and regarding the pin count, what you're trying to say, that 40 pin or 64 pin PICs aren't available in 16F series? For sure they are.
    So if you have simple, clean to understand code for working with MSSP in PBP, I'd like to have a look...

Similar Threads

  1. Graphical Displays with PBP3
    By richard in forum PBP3
    Replies: 114
    Last Post: - 25th February 2025, 21:38
  2. How to do the "SerIN" and "SerOut " for the usb ?
    By vicce67 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th March 2015, 02:01
  3. Replies: 0
    Last Post: - 14th November 2013, 03:32
  4. Replies: 3
    Last Post: - 15th October 2012, 08:06
  5. Replies: 1
    Last Post: - 16th February 2005, 20:05

Members who have read this thread : 1

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