Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8939171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:46:16+00:00 2026-06-15T10:46:16+00:00

I need a different way to have global access to 160*160 bits of data,

  • 0

I need a different way to have global access to 160*160 bits of data, that wont cause me to run out of ram. I am trying to create a back buffer for a 160*160 LCD black and white screen. so 160*10 ints gives me 160*160 bits because a int is 16bits. However I am running out of RAM on the board. Does anyone have a way to this where I wont use the ram? maybe allocating in someway? but I cant seem to get a proper way to allocate a 2d array. Is there any other way of doing this?

edit:
it is a msp430 rbx430 board,(here is a link to a picture of it http://i.ytimg.com/vi/rr18why8wzY/0.jpg ) and yes int’s are 16bits on this device. longs and doubles are 32bits. the device has 64k memory, and I am running it at 16mhz. I am asking for 3,200 bytes

as for it making sense, how does it not? I have a 64k device, where int’s are 16bits. I am creating a map for the 160*160 lcd screen by using the 1’s and 0’s to keep track of when a pixel is on or off. after i turn on all the pixels i want, i then take my map and apply it to the lcd. This way I do not have to draw to the lcd then erase the lcd then draw again. I can simply draw, and then draw over it. this will make it so it will not flicker.

effectively creating a back buffer to draw to the lcd.

static int lcdPixels[160][10];

    /*Must call this before using RBX430_graphics*/
    void initGraphics(void)
    {

        int h = 0;
        int w = 0;

        for(h=0; h < ROW_SIZE; h++)
        {
            for(w=0; w < COLUMN_SIZE; w++)
            {
                lcdPixels[h][w] = 0;
            }
        }
    }

———————————here is the rest———————–

void pixelOn(int posX, int posY)
{
    // first grab the right column
    int column = ( ((float)posX/16.0f) + 0.9f);
    // next grab the right bit
    int bit = posX;
    while(bit > 16)
    {
        bit = bit - 16;
    }

    //turn on the bit/pixel
    lcdPixels[posY][column] |= (1 << bit);
}

void pixelOFF(int posX, int posY)
{
    // first grab the right column
    int column = ( ((float)posX/16.0f) + 0.9f);
    // next grab the right bit
    int bit = posX;
    while(bit > 16)
    {
        bit = bit - 16;
    }

    //turn off the bit/pixel
    lcdPixels[posY][column] &= ~(1 << bit);
}

/* Call this to commit the current backBuffer to the LCD display*/
void commitBuffer(void)
{
    int h = 0;
    int w = 0;
    int k = 0;

    for(h=0; h < ROW_SIZE; h++)
    {
        for(w=0; w < COLUMN_SIZE; w++)
        {
            for(k=0; k < INT_SIZE; k++)
            {
                if((lcdPixels[h][w] & (1 << k)) >> k)
                {
                    lcd_point(((w * 16) + k), h, ON);
                }
                else
                {
                    lcd_point(((w * 16) + k), h, OFF);
                }
            }
        }
    }
}

So i now tried to allocate the array using malloc, and that is a no go as well. I guess I just can not do this, 160*160 bits is just to much data….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:46:17+00:00Added an answer on June 15, 2026 at 10:46 am

    Do you have 64K of RAM or 64K of Flash memory? I think the RBX430 has a msp430f2274 on it (http://www.ti.com/product/msp430f2274) which only has 1K of RAM.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So long story short, i have some forms (2) of them that, need different
I have three different development machines. Do I need three different iPhone Developer Program
I have a Maven multi-module project and I need two different parent POMs in
I have a global object MyFruits that can have multiple properties. At a minimum,
I need to provide some kind of global search over most of the data
I have a function that loops through different types of listings pulled from MySQL
I have created a script that analyzes a set of raw data and converts
I have standart MVC web project that register routes in global.asax. My MVC project
I have several modules (mainly C) that need to be redesigned (using C++). Currently,
For an application, I need to save user logs that come in different formats,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.