PBP RAM allocation - how to find available or total used RAM?


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,157


    Did you find this post helpful? Yes | No

    Default Re: PBP RAM allocation - how to find available or total used RAM?

    I'm not sure if my question is exactly related but, I'll ask it here.

    As I was able to get running 144x32 pixels ST7920 LCD module (Physically and comand-wise compatible with Hitachi HD44780 based 1602 LCD displays) with simple LCDOUT statements (no ASM, hard to guess commands and so on). Now I'm developing an "upgrade" code, which will use this display module with my own charset. Due to relatively high pixel density (144x32 vs 80x16 on HD44780), it is possible to display 18 chars X 4 lines text with 8x8 font on this module. These modules have built-in fonts (about 8192 characters!) but they're either big or ugly. So own character library is a must.

    So my idea is as follows (I already started coding it, and so far it appears to be going in the right direction).

    Use external EEPROM like 24C32, to hold graphic data for 128 characters, 8x8 pixels each.
    Develop a code, which reads appropriate character from external EEPROM and sends it to display according to user specified position.
    The main issue is that you can't that simply update specified location of this display module. Updates always are done in 16 bit increments - space for 2 chars. So when writing say character to position #3, I should take care about what is shown at position #4, and actually re-draw it, along with position #3. For this I plan to have array consisting of 72 elements (18x4), which will be updated and looked up before sending data to display, to avoid the character loss.
    There will be some other routines too, for reading and sending data to display. I estimate that all this will use about 2KB of code memory. But what about RAM? PBP manual says, arrays are limited to 96 bytes on PIC16 series. I guess this is related to amount of free ram. And if my array uses 72 bytes, will be there ram left for other my code? I mean, the code might compile to 2-3kb, but there will be no RAM to run additional code. Is such situation possible?

    Name:  40syms.jpg
Views: 819
Size:  239.1 KB

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,695


    Did you find this post helpful? Yes | No

    Default Re: PBP RAM allocation - how to find available or total used RAM?

    But what about RAM? PBP manual says, arrays are limited to 96 bytes on PIC16 series. I guess this is related to amount of free ram.
    some pic16 are limited to 80 bytes, its not about free sram but due to the fact that pbp uses "banking" to access the sram, the limit is the amount of gp ram available in a bank.
    arrays of much larger size can be used with linear memory access [you will not be interested since the word asm is involved]


    And if my array uses 72 bytes, will be there ram left for other my code? I mean, the code might compile to 2-3kb, but there will be no RAM to run additional code. Is such situation possible?

    absolutely
    Last edited by richard; - 6th October 2021 at 01:12.
    Warning I'm not a teacher

  3. #3
    Join Date
    Feb 2013
    Posts
    1,157


    Did you find this post helpful? Yes | No

    Default Re: PBP RAM allocation - how to find available or total used RAM?

    Ok, thanks.
    So I guess, it will be better to use dedicated PIC chip to do the display serving, and use another chip for general purposes.

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


    Did you find this post helpful? Yes | No

    Default Re: PBP RAM allocation - how to find available or total used RAM?

    So I guess, it will be better to use dedicated PIC chip to do the display serving
    it will be better to employ a PIC chip suited to the task, you may as well use a nexington or whatever they are called it's usually vastly easier
    than trying to design a multi pic system
    Warning I'm not a teacher

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


    Did you find this post helpful? Yes | No

    Default Re: PBP RAM allocation - how to find available or total used RAM?

    I tried Nextion, it is way too expensive, has bad quality, no daylight visible screens, not so robust. not so fast on booting and IDE is awful.
    I'm trying to experiment with "BIG" PIC chips. Mostly with ones with built-in LCD driver, so I can hook matrix directly.

Similar Threads

  1. Need Help ON the SPI F-RAM....
    By hankshone in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th February 2010, 19:29
  2. RAM not reseting
    By InitialDriveGTR in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd January 2010, 20:24
  3. RAM test
    By Sach_1979 in forum General
    Replies: 0
    Last Post: - 24th September 2009, 23:12
  4. Ram Gets Cleared
    By ljubex in forum General
    Replies: 2
    Last Post: - 7th November 2005, 00:38
  5. And last but not least: static ram?
    By bearpawz in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st November 2004, 05:37

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