Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | Floating point calculations in HCS12

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Floating point calculations in HCS12 - Patrick - Apr 24 22:20:55 2008

Hi there, I'm struggling to figure out how to multiply by floats in the
HCS12. For example, let's say we wanted to multiply 100 by 0.165. My
initial idea was to multiply 100 by 165 and then divide that result by
1000. I did this using the emul and ediv instructions, however I am
not getting correct results in my implementation. Could anyone provide
an example of how to do this? Thanks!
------------------------------------



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )