Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

msp430 look up table

Status
Not open for further replies.

rahulcet

New Member
Hi,

I need to make a look up table to store sine values in msp430g2231. I was trying to define constants as
const char look[100];

I need an index of 4000. Even with 100 the compiler tells me that 'program will not fit into'.

Any idea why this is happening?
 
I just barely got a 100 element "const char" array to work in a very very tiny MSP430G2231 program (using CCS v4) a couple minutes ago. Your 430G2231 may be a bit undersized for whatever you're trying to accomplish. Remember, these are 16-bit Von Neuman architecture cores so each assembler instruction uses one or two 16-bit words of memory. That means the 2 kB of memory on the '2231 actually only translates to about 750 or so assembly instructions. I was surprised (more like shocked) when my first "LCD Demo" last year used half of the '2231 memory (500+ words).

TI is pretty generous with samples. Have you considered sampling a 20-pin value-line 430G2452 (8k) or 430G2553 (16k)?
 
Last edited:
I am using CCS compiler. I havent tried sampling that any other uC yet. Are you people sure that 2000 words cant come in the memory.
 
If you are using CCS you can check the .map file under the Debug or Release folder to see the memory and how it is being used.

It seems pretty basic that if you have a 2k part, you aren't fitting all that much on it. Even if you got 2k bytes of const data on it, where is your program going?

I created a LCD library for a F2272 and I seem to remember having a bit of trouble getting the const to move data to FLASH. You might need to change to release mode to compile it to force everything to optimize properly. My assignment looked like this:
Code:
unsigned const char FONT8x8[97][8] =
{
   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },       // ASCII -  32
.... more
 
I understand that 2231 is not good enough for me. I just placed an order for 2553. The same program was building well with 2553.
So thanks everybody.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top