Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
speakerguy79 said:Can I use a 24F? It's a bit simpler
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.
ex-navy said:I love sitting back and reading these opinions.
You have the ASM side
You have the C side.
You have the "sitting on the fence" guys.
All trying to convince the other side, of it's own merits.
Learn both, enrich yourself, try both, then, go with what's best for you after you walk in another mans shoes.
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.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...
DIVIDER
PIC18F devices do not provide any hardware support
for division. Typical divide operations (signed 16/16 or
16/8) performed, using the standard PIC18F math
library, can take up to 38 instruction cycles to execute.
PIC24F devices do not have a hardware divider per se.
Instead, the PIC24F ALU is configured in hardware to
support a divide instruction, DIV. Together with the
REPEAT control instruction, DIV allows the ALU to
automatically execute the iterative division process as
a simple sequence instead of a long algorithm. DIV
supports several forms of 32/16 and 16/16 divides,
including fixed-point and fractional, and performs
executions in 19 instruction cycles.