Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Microchip C for dsPICs

Diver300

Well-Known Member
Most Helpful Member
I'm using MPLABX 6.0 to program a dsPIC33CH128MP506.

Does anyone know how to insert bits of assembly language, or how to get the code to perform a software reset?

Also, is there a list of commands for Microchip C?
 
I'm using MPLABX 6.0 to program a dsPIC33CH128MP506.

Does anyone know how to insert bits of assembly language, or how to get the code to perform a software reset?

Also, is there a list of commands for Microchip

Look at the examples out there, in particular the DSP examples use embedded assembler for the speed of the dedicated DSP assembler instructions.

Presumably the XC16 compiler manual lists the compiler instructions, but basically it's just C - again, the examples are probably the most useful thing out there.

However, I've been trying to compile DSP examples with MPLABX using XC16, and I've not having any luck?, they fail like this:

Code:
build/default/production/filter_design.o(.text+0x170): In function `.LBB3':
: undefined reference to `_Float2Fract'
build/default/production/filter_design.o(.text+0x18e): In function `.LBB3':
: undefined reference to `_Float2Fract'
build/default/production/filter_design.o(.text+0x264): In function `.LBB5':
: undefined reference to `_Float2Fract'
build/default/production/filter_design.o(.text+0x356): In function `.LBB7':
: undefined reference to `_Float2Fract'
build/default/production/filter_design.o(.text+0x3c6): In function `.L21':
: undefined reference to `_Fract2Float'
build/default/production/filter_design.o(.text+0x3ca): In function `.L21':
: undefined reference to `_Float2Fract'
build/default/production/filter_design.o(.text+0x3e2): In function `.L19':
: undefined reference to `_Fract2Float'
build/default/production/filter_design.o(.text+0x3ec): In function `.L19':
: undefined reference to `_Float2Fract'
build/default/production/filter_design.o(.text+0x4fa): In function `.LBB10':
: undefined reference to `_Float2Fract'
build/default/production/filter_design.o(.text+0x5aa): In function `.L31':
: undefined reference to `_Float2Fract'
build/default/production/filter_design.o(.text+0x66c): In function `.L29':
: undefined reference to `_Float2Fract'
build/default/production/filter_design.o(.text+0x736): In function `.L30':
: undefined reference to `_Float2Fract'
build/default/production/arduino.o(.text+0x40e): In function `.L58':
: undefined reference to `_timer2_driver_init'
build/default/production/multiply_fract.o(.text+0xfe): In function `_multiply_fractcomplex_by_Q16':
: undefined reference to `__Q16mpy'
build/default/production/multiply_fract.o(.text+0x114): In function `_multiply_fractcomplex_by_Q16':
: undefined reference to `__Q16mpy'
build/default/production/multiply_fract.o(.text+0x19a): In function `_multiply_fract_by_Q16':
: undefined reference to `__Q16mpy'
build/default/production/goertzel.o(.text+0x142): In function `L2':
: undefined reference to `__Q16mpy'
build/default/production/goertzel.o(.text+0x150): In function `L2':
: undefined reference to `__Q16mpy'
build/default/production/misc.o(.text+0x1c): In function `.L2':
: undefined reference to `__Q15abs'
build/default/production/misc.o(.text+0x28): In function `.L2':
: undefined reference to `__Q15atanYByXByPI'
build/default/production/misc.o(.text+0x42): In function `.L3':
: undefined reference to `__Q15atanYByXByPI'
build/default/production/main.o(.text+0x14): In function `_main':
: undefined reference to `_FIRStructInit'
build/default/production/main.o(.text+0x18): In function `_main':
: undefined reference to `_FIRDelayInit'
build/default/production/main.o(.text+0x50): In function `.L3':
: undefined reference to `_FIR'

And I can't figure out why?.

I have though been able to do so following the examples from the various ones here:


By installing his specific IDE etc. which is called Jade, you can download it at the bottom of this page, and it took me hours to actually locate the link at the bottom of the page:


Notice this uses the same XC16 compiler, yet it works, and the Jade file also contains his examples.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top