Most registers in the MSP are 16 bits long, so an int value is 2 bytes (16 bits) long.
As per normal, you can turn on bits with !=bitmask and turn them off with &= ~bitmask.
With IAR tools you can use the "@" operator, or #pragma location to set an absolute memory location for a variable. The compiler will reserve that space and not place other variables in conflict. __no_init char MyArray[0x40] @ 0x200;
Also:
See also:
IAR originally came from the initials of it's founder: Ingenjörsfirma Anders Rundgren. Anders (which is a common name in Sweden) founded IAR in 1983 and wrote the first ever C compiler for a micro controller, the 8051.
| file: /Techref/ti/msp430/c.htm, 1KB, , updated: 2008/6/12 11:35, local time: 2012/5/25 01:27,
38.107.179.233:LOG IN |
| ©2012 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/tecHREF/ti/msp430/c.htm"> TI MSP430, MSP430 C compiler, C compiler, C language</A> |
| Did you find what you needed? |
|
Enter the PICList design contest to win a free PCB from olimex.com! |
Robotics nuts!Check out http://users.frii.com/dlc/robotics/projects/botproj.htm from Dennis Clark. This guy ROCKS! He has made (and sells but also releases code, docs, etc...) for a number of cool little robotic modules including whiskers, IR proximity detect and remote control, Sonar proximity detect, PWM, Servo, compass. Most of these use the little PIC 12C508 controller which costs basically nothing and is soooo tiny.The 4 servos, 2400 baud serial servo controller is a wonder of magic and he sells the programmed chip for $8. Wow! |
.