EB085 and Flowcode6 for dsPIC: upgrade urgently needed

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
randomrichard
Posts: 41
Joined: Thu Oct 16, 2008 11:01 am
Has thanked: 21 times
Been thanked: 7 times
Contact:

EB085 and Flowcode6 for dsPIC: upgrade urgently needed

Post by randomrichard »

Hi
It appears that the EB085 cannot easily be used with dsPIC's on the EB064 board. Setting up the SPI link is not possible because the pin assignments revert to "Port C" pins which don't exist on dsPIC's. I have filed a bug report. Just for fun I hooked the EB085 up to my Arduino Due and got it cracking along delivering 16bit data at 6.6KHz, with scope for more, using about 10 lines of "Processing" code. But of course the ARM has no DSP. Given that, according to Prof Steven Smith ( see his DSP book, Newnes, 2003), DSP is the 21st century equivalent of the transistor, can we please have some working upgrades in that direction?
Richard

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB085 and Flowcode6 for dsPIC: upgrade urgently needed

Post by Benj »

Hello,
It appears that the EB085 cannot easily be used with dsPIC's on the EB064 board. Setting up the SPI link is not possible because the pin assignments revert to "Port C" pins which don't exist on dsPIC's.
Try changing the SPI channel property and the ports should reallocate themselves to match the target device your using. I fnot then can you post your program so we can have a look.
But of course the ARM has no DSP
Not sure what you mean by this DSP is digital signal processing, all microcontrollers are capable of this. ARM also has 32-bit hardware making it attractive for use with DSP.

The dsPIC devices have hardware designed to cope better with DSP maths but all micro's will work to some extent.

Have you looked in the Flowcode v6 help, specifically at the DSP components. There are a lot of examples there at the moment with more to come soon.

randomrichard
Posts: 41
Joined: Thu Oct 16, 2008 11:01 am
Has thanked: 21 times
Been thanked: 7 times
Contact:

Re: EB085 and Flowcode6 for dsPIC: upgrade urgently needed

Post by randomrichard »

Benj
Thank you for your patience and advice. It just never occurred to me that I should change to "channel 1". I see now that the default setting; "software" was specifically for your example on the 877A. I'm aware that all processors can do DSP - my desktop does, using routines from Smith's book. The binary maths load converting the padded AD7680 digital output is such that is unlikely that ADC will achieve my target sample rate, so I will probably feed the EB085's analogue output straight to the dsPIC's ADC and make do with 12bits.

randomrichard
Posts: 41
Joined: Thu Oct 16, 2008 11:01 am
Has thanked: 21 times
Been thanked: 7 times
Contact:

Re: EB085 and Flowcode6 for dsPIC: upgrade urgently needed

Post by randomrichard »

I have attached a short Flowcode 6 file for accepting signals from the EB085 by the dsPIC33FJ128GP802, obviously based closely on MM's F5/6 example (I don't have a PIC licence for F6). I hope it helps others confused by the plethora of options! The program delivers a 16 bit word "signal" at a 20 kHz sample rate. This could be increased by going for The AD7680's 20 bit output option but it's plenty for my job!
ADCto33FJDSP.fcfx
(7.43 KiB) Downloaded 294 times
The pictures show the lovely clean CS and SCK signals and an example of the 16bit output (a 2Vpp signal at 8KHz)
EB085_SS_ and_SCK waveforms.jpg
EB085_SS_ and_SCK waveforms.jpg (17.67 KiB) Viewed 4127 times
2Vpp8Khzsine.jpg
2Vpp8Khzsine.jpg (12.92 KiB) Viewed 4127 times

Post Reply