Dear All,
In MSP430, the basic memory size of variable is used 16bit in SDRAM.
How to set a variable which just used 8bit (or 4bit) memory size for saving SDRAM density.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear All,
In MSP430, the basic memory size of variable is used 16bit in SDRAM.
How to set a variable which just used 8bit (or 4bit) memory size for saving SDRAM density.
Hi Dennis,
there's no 4-bit data type available by default, but you can use a bitfield to create one by your own. Search the forum for 'bitfield'; there some threads covering this.
Here's a list of all available data types:
Kind regards
aBUGSworstnightmare
SDRAM? This ain't a PC . It's simply SRAM. :)Dennis Tsai said:SDRAM
4 bit variables are not directly supported. You can use bitfields, so the compiler will construct the 4 bit values from a 16 bit storage location. However, bitfields are relatively slow in both, read and write.
Note that the IAR assembler does not support bitfields on assembly level. So you cannot mix structs that define bitfields in C with assembly functions, at least not in IAR.
**Attention** This is a public forum