[MCU] 请问msp430f5529的数据类型长度

[复制链接]
3252|31
 楼主| wdliming 发表于 2019-5-15 11:02 | 显示全部楼层 |阅读模式
如题所问,msp中int long double float 分别是几个字节啊??对16位单片机没接触过。谢谢!
 楼主| wdliming 发表于 2019-5-15 21:11 | 显示全部楼层
哪位指导下???
zhangmangui 发表于 2019-5-15 22:47 | 显示全部楼层
Data types and memory handling

MSP430 architecture processors use a single address space to map data and code. The registers and memory are 16 bits wide, and the CPU can only read and write 16 bit data at even addresses. If you attempt to read or write a 16 bit value at an odd address, the CPU behaves as if the LSB is not set. The processor has no exception handling. The MSP430 can read and write 8 bit data at any address.

The C compiler supports the following basic data types


•char - 1 byte (8 bits)


•int - 2 bytes (16 bits)


•long - 4 bytes (32 bits)


•long long - 8 bytes (64 bits)


•float - 4 bytes

zhangmangui 发表于 2019-5-15 22:47 | 显示全部楼层
这个是我分享的C2000数据类型   请查看   这个比较特殊
https://bbs.21ic.com/icview-556056-1-1.html
zhangmangui 发表于 2019-5-15 23:15 | 显示全部楼层

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| wdliming 发表于 2019-5-16 11:42 | 显示全部楼层
 楼主| wdliming 发表于 2019-5-16 11:43 | 显示全部楼层
zhangmangui 发表于 2019-5-15 22:47
Data types and memory handling

MSP430 architecture processors use a single address space to map dat ...

好的。谢谢分享~~
 楼主| wdliming 发表于 2019-5-27 11:17 | 显示全部楼层

请问这份文档那里有??
 楼主| wdliming 发表于 2019-5-27 11:20 | 显示全部楼层

还想请问一下,short unsigned int在msp430中是几位大小?谢谢!
zhangmangui 发表于 2019-5-27 21:47 | 显示全部楼层
wdliming 发表于 2019-5-27 11:20
还想请问一下,short unsigned int在msp430中是几位大小?谢谢!

应该是16bit的   
zhangmangui 发表于 2019-5-27 21:49 | 显示全部楼层
wdliming 发表于 2019-5-27 11:17
请问这份文档那里有??

这个帖子有分享啊
https://bbs.21ic.com/icview-2813622-1-1.html
kkzz 发表于 2019-6-2 16:10 | 显示全部楼层
int 占两个字节               
hudi008 发表于 2019-6-2 16:10 | 显示全部楼层
int 、float、long 都占 4 字节
lzmm 发表于 2019-6-2 16:11 | 显示全部楼层
byte 8位 1个字节
char 16位  2个字节
short 16位 2个字节
int 32位   4个字节  
minzisc 发表于 2019-6-2 16:11 | 显示全部楼层
char 16位2个字节 byte 8位1个字节 short 16位2个字节
selongli 发表于 2019-6-2 16:11 | 显示全部楼层
short char 都是两个字节   
fentianyou 发表于 2019-6-2 16:12 | 显示全部楼层
.int: 4个字节 unsigned int : 4个字节  
xiaoyaodz 发表于 2019-6-2 16:12 | 显示全部楼层
int 4字节 float 4字节 double 8字节 long 4字节 unsigned long 4字节  
febgxu 发表于 2019-6-2 16:12 | 显示全部楼层
int是基本的数据类型; Integer是int的封装类  
sdlls 发表于 2019-6-2 16:13 | 显示全部楼层
int,float,long,double取值范围是多少?  
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:我的未来不是梦

76

主题

914

帖子

4

粉丝
快速回复 在线客服 返回列表 返回顶部