piclist 2000\12\22\005314a >
Thread: Challenge! (Everyone loves a...)
face BY : Nikolai Golovchenko email (remove spam text)

Just another idea.

The result of
>        60 x 1,000,000         (conversions for minutes and us)
>rpm = ------------------
>      16 bit timer value

can be in range of 60000000 to 915.5 rpm. If the maximum rpm
fits into 16 bits, you can use your 16 bit division routine
to do that!

Just initialize nominator (dividend) AND remainder with
60*1e6 (0x3938700), and branch to the division loop start:

       clrf y0
       movlw 0x87
       movwf y1
       movlw 0x93
       movwf rem0
       movlw 0x03
       movwf rem1
       jmp divide16by16_loopstart

8 instructions!

Happy Holidays everyone!!!


---- Original Message ----
From: Drew Vassallo <TakeThisOuTsnurple@spam@spamspamHOTMAIL.COM>
Sent: Thursday, December 21, 2000 22:06:19
 To: TakeThisOuTPICLISTRemoveMEspam.....MITVMA.MIT.EDU
Subj: [PIC]: Challenge! (Everyone loves a...)

{Quote hidden}

http://www.piclist.com hint: To leave the PICList

<1456195317.20001222074935@yahoo.com> 7bit

In reply to: <F80jS5C7lAhj16tFKHZ00004a53@hotmail.com>
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Challenge! (Everyone loves a...)

month overview.

new search...