Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62510

Forum Post: Storing constants in msp430g2553

$
0
0
I am trying to communicate with an external energy metering ic using uart. A typical operating procedure is msp430 transmits 5 bytes of data and energy meter replies back with 3 bytes of data. The fisrt step is to initialise the metering IC. For this we have to perform 25 different transmit cycles(i.e 25 different byte arrays should be sent to intialise the energy meter ic). And all this byte array values is constant. So total constants i have amount to 125 bytes. Then there is separate byte array for getting current,voltage, energy, power values.. If I want 5 parameters, then i would need 5*5=25 bytes of constants. And this polling of parameter values is done continuously. Since I have approx 150 bytes of constants which dont change during run time, I'm planning to store them in flash memory. Then I would use Interrupt service routines to transmit these byte arrays one by one. How can I store all these constants in flash memory? Also is there a better/efficient way to achieve the above functionality?

Viewing all articles
Browse latest Browse all 62510

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>