Question:

How do I know if microchip's PIC18f4520 I am using, is in 8bits,16bits or is in 32bits mode

by  |  earlier

0 LIKES UnLike

By looking at the program written in C language, how do I know if microchip's PIC18f4520 I am using, is in 8bits,16bits or is in 32bits mode. Thanks

 Tags:

   Report

1 ANSWERS


  1. This is an 8 bit processors; there are no such modes. It does have an 8x8bit one cycle hardware multiply. To do 16b binary arithmetic, or floating point operations, there are library routines that do the operations one byte at a time. 8bit binary ops will be very fast, 16b binary nearly as fast, and floating point stuff will be relatively slow.

    You should declare the data types for each variable in the compiler, often at the beginning of the program. As long as the compiler knows what type of variable, it will automatically insert the code needed to call libraries that perform the desired functions on the appropriate data type. Many compilers used to have different symbols for different operations: example, one for 8b binary multiply, another for FP multiply. More common now to just use the multiply symbol, and the compiler keeps track of data types to automatically call the correct routine.

    Edit: can you give link to the formula/explanation? Hard to tell exactly what the message means without a little more detail.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.