Value of an int

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Value of an int

跳至解决方案
2,799 次查看
Andrey
Contributor III
I'm trying to send a value of an unsigned int from HCS08 (AW60). Any suggestions?
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,363 次查看
J2MEJediMaster
Specialist I
Take a look at the end of this thread. In particular, look at Lundin's post. He provides the C code of a routine that converts a 32-bit int into characters. It should be suitable for your use.

---Tom

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,363 次查看
CrasyCat
Specialist III
Hello
 
What do you want to do exactly?
 
Where do you want to send the value of your int?
 
Can you be a little bit more specific please
 
CrasyCat
0 项奖励
回复
1,363 次查看
Andrey
Contributor III
Basically, I have an integer (16-bit) that I want to send over the serial port. I have routines that send the value  of a char (8-bit) and a string (multiples of chars). So I'm looking for a way to either divide an int into two chars. Hope it's clearer now.
0 项奖励
回复
1,364 次查看
J2MEJediMaster
Specialist I
Take a look at the end of this thread. In particular, look at Lundin's post. He provides the C code of a routine that converts a 32-bit int into characters. It should be suitable for your use.

---Tom
0 项奖励
回复