EB085 DSP input board
-
- Posts: 41
- Joined: Thu Oct 16, 2008 11:01 am
- Has thanked: 21 times
- Been thanked: 7 times
EB085 DSP input board
Hiyah!
I seem to be the first person to try out your EB085 board judging by the lack of discussion in the forum. I would be grateful if you would direct me to the test file DSP_Input.hex mentioned in the board's document. Meanwhile I shall try to do my own test...
Richard
I seem to be the first person to try out your EB085 board judging by the lack of discussion in the forum. I would be grateful if you would direct me to the test file DSP_Input.hex mentioned in the board's document. Meanwhile I shall try to do my own test...
Richard
- 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 DSP input board
Hello,
Here are the files mentioned in the datasheet. Let me know if you have any problems.
Here are the files mentioned in the datasheet. Let me know if you have any problems.
- Attachments
-
- DSP_Output.hex
- (1.94 KiB) Downloaded 505 times
-
- DSP_Output.fcf
- (19.49 KiB) Downloaded 599 times
-
- DSP_Input.hex
- (1.63 KiB) Downloaded 516 times
-
- DSP_Input.fcf
- (14.85 KiB) Downloaded 625 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 41
- Joined: Thu Oct 16, 2008 11:01 am
- Has thanked: 21 times
- Been thanked: 7 times
Re: EB085 DSP input board
Hello
Thanks for the code. The EB085 works remarkably well. The code has given me access to the type of manipulations necessary for DSP operations. I plan to use Flowcode 6 and the dsPIC33FJ128GP802 to build my sonar system based on the newly-arrived EB064, which is intended to process chirp signals, as used in radar and sonar, for greater range and precision in noisy conditions. This will supplant a working system I have built on an Arduino Due. However, despite its mighty ARM processor the Due's signal handling speed isn't up to the job.
I can't find any HELP reference to your use of variable names preceded by a dot, as in the macros you have written in the example files. But presumably this is just what one does, in macros?
Richard
Thanks for the code. The EB085 works remarkably well. The code has given me access to the type of manipulations necessary for DSP operations. I plan to use Flowcode 6 and the dsPIC33FJ128GP802 to build my sonar system based on the newly-arrived EB064, which is intended to process chirp signals, as used in radar and sonar, for greater range and precision in noisy conditions. This will supplant a working system I have built on an Arduino Due. However, despite its mighty ARM processor the Due's signal handling speed isn't up to the job.
I can't find any HELP reference to your use of variable names preceded by a dot, as in the macros you have written in the example files. But presumably this is just what one does, in macros?
Richard
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: EB085 DSP input board
Any variable with a name preceded by a dot is a local variable or a parameter for that macro and is only accessible within the macro. Variable names without a dot are global and are accessible from any macro.randomrichard wrote: I can't find any HELP reference to your use of variable names preceded by a dot, as in the macros you have written in the example files. But presumably this is just what one does, in macros?
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 155
- Joined: Thu Feb 10, 2011 4:39 am
- Location: Las Vegas, Nevada USA
- Has thanked: 40 times
- Been thanked: 19 times
Re: EB085 DSP input board
Anyone who understands it please explain!
In the above flowcode program "DSP_Input.fcf" posted by Ben, in the Read_ADC macro at the bottom there is a calculation performed which I do not understand. A variable with a period before it is a local variable, OK. Is there something unique about .Return or can any variable return a local variable value into a global variable when the macro ends? Also I don't understand the shifting sequence and the or commands. It seems that the .Return can equal several different things. Will someone please explain the sequence. Also, above the calculation , the the read ADC is used via the SPI three times in succession returning each in different variables ( .upper, .mid, .lower). Why is that done, I know that it all ties together but I can't wrap my head around it. Please enlighten me. All help will definitely be appreciated.
Larry
In the above flowcode program "DSP_Input.fcf" posted by Ben, in the Read_ADC macro at the bottom there is a calculation performed which I do not understand. A variable with a period before it is a local variable, OK. Is there something unique about .Return or can any variable return a local variable value into a global variable when the macro ends? Also I don't understand the shifting sequence and the or commands. It seems that the .Return can equal several different things. Will someone please explain the sequence. Also, above the calculation , the the read ADC is used via the SPI three times in succession returning each in different variables ( .upper, .mid, .lower). Why is that done, I know that it all ties together but I can't wrap my head around it. Please enlighten me. All help will definitely be appreciated.
Larry
-
- Posts: 155
- Joined: Thu Feb 10, 2011 4:39 am
- Location: Las Vegas, Nevada USA
- Has thanked: 40 times
- Been thanked: 19 times
Re: EB085 DSP input board
I am starting to get it. The process is combining the binary data by shifting (<<) and or (l) statements.
I still don't understand why shift 12 places, I would have thought 8 places. The digital signal processing book from the course explains it but I think the example in the book is wrong for the:
.Return = .upper<<12
Initially .upper = 10101100
and after the <<12 16bit = 1010000000000000 is this right or is it wrong. please explain.
Larry
I still don't understand why shift 12 places, I would have thought 8 places. The digital signal processing book from the course explains it but I think the example in the book is wrong for the:
.Return = .upper<<12
Initially .upper = 10101100
and after the <<12 16bit = 1010000000000000 is this right or is it wrong. please explain.
Larry
- 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 DSP input board
Hello Larry,
www.farnell.com/datasheets/1511560.pdf
Therefore the return variable is the combination of the 16-bit value from the 3 bytes received from the ADC.
The .Return variable is only available when you have specified a return variable for your macro. Double click on the macro start icon and you can edit things like the parameters, return and locals.Is there something unique about .Return or can any variable return a local variable value into a global variable when the macro ends?
The ADC on the EB085 returns a 16-bit value but spread out over three bytes with 4 unused bits at either side of the 16-bit data. If you look at page 17 of the ADC datasheet then it should help to clear things up.I still don't understand why shift 12 places,
www.farnell.com/datasheets/1511560.pdf
Therefore the return variable is the combination of the 16-bit value from the 3 bytes received from the ADC.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 155
- Joined: Thu Feb 10, 2011 4:39 am
- Location: Las Vegas, Nevada USA
- Has thanked: 40 times
- Been thanked: 19 times
Re: EB085 DSP input board
Hi Ben
That was extremely helpful. I have a much better understanding. I do have 1 loose end.
The explanation in the DSP training manual.
If I understand it correctly, then Initially should read .upper 00001010 and not (101001100) and .lower 10000000 and not (10000001) to account for the leading and trailing 4 zeros.
Please help me with this..
Larry
That was extremely helpful. I have a much better understanding. I do have 1 loose end.
The explanation in the DSP training manual.
If I understand it correctly, then Initially should read .upper 00001010 and not (101001100) and .lower 10000000 and not (10000001) to account for the leading and trailing 4 zeros.
Please help me with this..
Larry
- 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 DSP input board
Hi Larry,
Yes you are right the values from the ADC will be 0's outside of the 16-bit data window. I think the values shown are simply examples to help show which parts of the data are collected rather then actual demonstration values from the ADC.If I understand it correctly, then Initially should read .upper 00001010 and not (101001100) and .lower 10000000 and not (10000001) to account for the leading and trailing 4 zeros.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 155
- Joined: Thu Feb 10, 2011 4:39 am
- Location: Las Vegas, Nevada USA
- Has thanked: 40 times
- Been thanked: 19 times
Re: EB085 DSP input board
Hi Ben
Ok, good news. Then I do understand what is going on.
Thank you very much for your help.
Larry
Ok, good news. Then I do understand what is going on.
Thank you very much for your help.
Larry