Assembly / C?

Status
Not open for further replies.
PIC24 have their hardware divider built-in, so yeah it has to be really simple to use. I just never used any PIC24 yet. Not sure if C30 use the hardware divider...
 
speakerguy79 said:
A smart compiler might, in some instances, be better than someone coding assembly.

Let's say you wanted to divide a number by 4. Think of one way on a PIC18 device that a compiler might make this faster than someone coding in assembly.

Compilers also have the luxury of optimizing code without damaging the readability of the source.
 

Psssshhhawww! Says the fence sitter. lol.

mister_e said:
PIC24 have their hardware divider built-in, so yeah it has to be really simple to use. I just never used any PIC24 yet. Not sure if C30 use the hardware divider...
Do they really? The dsPICs from which the PIC24s are based don't have a hardware divide. It takes 14-18 cycles (or something like that) to do the iterative divide they do support. They have some piece of hardware to help with division, but it's not a single cycle divide.
 
Last edited:
Well that's what their datasheet says... i wasn't aware of it 'till today... not sure the amount of cycles needed for the division... i just saw it was built-in
 
Last edited:
What flavor do you like

This forum has some of the best discussions!

What is so interesting is the amount of expertise from so many different "schools of thought" and how one can learn "so many ways to skin a cat, with so many tools"

I remember learning to program in machine language and how all of us techie's in the Navy balked at the first news of using a compiler.

So many advances in technology, so little time....
 
Last edited:
Regarding 24F DIV discussion - here is a paragraph from the Microchip document on migrating from the 18F to 24F series:

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…