Value of an int

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Value of an int

Jump to solution
1,901 Views
Andrey
Contributor III
I'm trying to send a value of an unsigned int from HCS08 (AW60). Any suggestions?
Labels (1)
Tags (1)
0 Kudos
1 Solution
465 Views
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

View solution in original post

0 Kudos
3 Replies
465 Views
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 Kudos
465 Views
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 Kudos
466 Views
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 Kudos