I'm not much of a programmer so I need a bit of help on this one.
I'm writing a Java prog that communticates over rs232 to tape machines and
I've got a problem which I'm not sure how to solve. My program recieves
timecode information over four bytes, one for hours, one for minutes etc.
The upper nibble counts 10's and the lower nibble counts 1's. What would
be a good way of accessing and reading the nibbles???
My guess is that the upper nibble could be shifted four but for the lower
nibble I'm not sure.
--
/* Hugh Lutley aKa Spewy
* This message was created on either
* Mandrake 9.2 Linux on Athlon XP <- Gnome 2.4 ->
* Slackware 9.1 Linux on P166 <- Command Line Zone ->
*/
(created in ViM)
I'm writing a Java prog that communticates over rs232 to tape machines and
I've got a problem which I'm not sure how to solve. My program recieves
timecode information over four bytes, one for hours, one for minutes etc.
The upper nibble counts 10's and the lower nibble counts 1's. What would
be a good way of accessing and reading the nibbles???
My guess is that the upper nibble could be shifted four but for the lower
nibble I'm not sure.
--
/* Hugh Lutley aKa Spewy
* This message was created on either
* Mandrake 9.2 Linux on Athlon XP <- Gnome 2.4 ->
* Slackware 9.1 Linux on P166 <- Command Line Zone ->
*/
(created in ViM)
Comment