Hi all

I need some help on a 16bit variable

I receive serial at 9600 bd N8,1 a string with 2 positions each 16bit

example:
21 AD 34 01 22 EF 23 02

where:
21 is indicating the 1st position request
AD 34 16bit position 1
01 not used

22 is indicating the 2nd position request
EF 23 16bit position 2

Now I need to display both positions on a LCD in degrees

So AD 34 is 44340 decimal

65536 / 360 = 182.04444444 Per degree

So 44340 / 182.0444444 = 243,56689453125 degrees

I need to display 243 and 566 on a LCD

Same for the 2nd position

How can I handle those variables in PBP ?


Thanks Walter