Replacing array member on the fly (big LCD characters idea)


Closed Thread
Results 1 to 38 of 38

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Really nice job on the big numbers.

    What is the difference between parallel - serial LCD? Other than electrical connections and some specific commands? Have not used serial so far but I guess behind the serial driver everything else is the same.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Thanks. I have experience of making pseudographics (so called ASCII art) since early 80s. That set of characters also can be used to display most latin alphabet letters, except some. Regarding the LCD, I have no idea, but above example uses serial LCD and I don't see any PBP manual entries for serial LCD.

  3. #3
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    I counted 8 custom characters and a full block(possibly from the existing character set). Is that correct?

    Enumerating,

    Full rounded top left corner,
    Full rounded top right corner
    Full rounded bot left corner
    Full rounded bot right corner
    bottom line
    top line
    half rounded top left corner
    half rounded top right corner
    and
    the full block

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


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Yes, there are 8 custom characters and char #255 - Full block is used.

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


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Here's 2x2 font for 1602 OLED (Here you can write bytes directly, not limited by 8 custom chars).

    Name:  picbasical.jpg
Views: 11903
Size:  63.5 KB

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


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Wanted to store above font in EEPROM. each character takes 2x13 bytes. so 260 byte of memory are needed, but most chips have only 256 bytes of eeprom available.
    I come up with run length encoding compression idea. Since there are only 5 bits used, can use remaining 3 as a counter, showing how many times current pattern should be repeated. This gives ability to repeat up to 8 positions

    Say for character 4 (top left part), in "normal" mode, bit pattern looks like this: %11000. But if we add %110 to end of it, so it now looks like %11000110, decoder software will know that it have to repeat that pattern 6 times.

    So code for reading and decoding char to appropriate DDRAM or whatever it is called, should work like this:

    1. Set pointer address from which the bitmap should be read.
    2. Read it, if 3 last bits<>0 then separate it, and do the loop, writing the code of first 5 bits, repeating them times specified in these 3 bits.
    3. Continue reading of bitmap as needed.

    But I have issue with statement for dividing bit variable into two. Say I have %10101010. How should I divide it into two variables, one which has 5 bits from left, and another having 3 bits from right?

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Quote Originally Posted by CuriousOne View Post
    But I have issue with statement for dividing bit variable into two. Say I have %10101010. How should I divide it into two variables, one which has 5 bits from left, and another having 3 bits from right?
    Something like this?

    Code:
    byte_var    var byte
    a_left         var byte
    b_left         var byte
    
    byte_var=%10101010
    a_left=byte_var & %11111000
    b_left=byte_var & %00000111
    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Just did a rough estimation - the above idea should save 30-40% of EEPROM space. Not bad.

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


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Also it is possible to separate and replace some similar blocks with additional indexes - this should save additional 10-20%...

Similar Threads

  1. String of characters(array) to decimal value
    By tacbanon in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 20th June 2012, 14:30
  2. write big text to lcd
    By isaac in forum General
    Replies: 3
    Last Post: - 8th October 2008, 01:45
  3. Big big big memory or tiny SDs!
    By Ron Marcus in forum Off Topic
    Replies: 9
    Last Post: - 25th May 2007, 18:02
  4. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  5. Replacing an ARRAY with EEPROM write to save space?
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th March 2005, 18:31

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