Matlab-Simulink device driver Blockset for Microchip dsPIC / PIC24 / PIC32 Microcontrollers.

DsPIC Block/Compiler Configuration

From http://www.kerhuel.eu/wiki - Simulink device driver Blockset for dsPIC / PIC24 / PIC32 Microcontrollers --[[User:LubinKerhuel|LubinKerhuel]] 12:40, 3 September 2009 (UTC)
Jump to: navigation, search
Block Compiler Configuration

Set compilers options

Dialog Box Parameters

Double in 64 bits if checked, default is 32

Configuration Dialog

Simulink simulation use 64 bits double for double data type. The C30 compiler default size for double is 32 bits (equivalent to simulink single variable). This option force the dsPIC/PIC24 C30 Compiler size for double diagram data type to 64 bits doubles. 64 bits double gives more precise results at the cost of a slower computation time and a larger code size. You should considere using fixed point calculation that will speed up the calculation and reduced the code size ! The fixed point toolbox is perfect to optimized the scaling of your fixed point variables.