Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 11, 2016, 08:57:10 08:57


Login with username, password and session length


Pages: [1]
Print
Author Topic: DSP/dsPIC Getting Started  (Read 561 times)
0 Members and 1 Guest are viewing this topic.
biomed12
Junior Member
**
Offline Offline

Posts: 52

Thank You
-Given: 37
-Receive: 3


« on: September 25, 2016, 10:28:11 22:28 »

Hello dear members,

I am a last class eee student and I started to study on digital filters. I want to design a 0-150 Hz band pass filter for getting started(I have not determined certain parameters, I want to do something that behaves like 0-150Hz analog bandpass filter. I say it because some experts come and asking always about details and advanced topics. I dont ask that. Just I said my intention, anyway...).(Also I know theory and fundamentals, I started the pyhsically implementation).

I have coded MCUs about 1 years. So I thought that, I could implement a digital filter using a dsPIC easyly. I asked some people to use dsPIC, almost everyone told about that as if it is a s*it. First question is about that, why signallers see the dsPIC as an enemy? Can't I do an digital filter with dsPIC, that behaves like 0-150 hz analog band pass filter?

Secondly, How can I get started with DSPs? For example, for MCU coding, I got a PICKIT2 programmer, downloaded an IDE, and wrote the C codes and the last, I flashed my hex to PIC using that programmer, so all things was that. But I don't know how to start with DSP coding and implementation. What is the requirements? I found some books which were written 15 maybe 20 years ago and DSPs which are in that books are not available yet. I googled also searched from Digi-Key to find a starter kit or any chip to start, and now I am very very confused. If you were me, how did you started with DSPs? (I am a student so low cost kits would be perfect for me)

Lastly, What is the exact discrimination between DSPs and ordinary MCUs? There are always turning the same things about these on the internet. Allmost all of web site writes like copied from wikipedia. The discrimination comes from architecture? For example, can't I use my raspberry PI 3, which has cortex CPU, as a DSP?

I hope some of members don't distribute the topic with details. I tried to ask clearly.

Thanks.
« Last Edit: September 25, 2016, 10:35:27 22:35 by biomed12 » Logged
h0nk
Active Member
***
Offline Offline

Posts: 120

Thank You
-Given: 90
-Receive: 83



« Reply #1 on: September 26, 2016, 04:09:38 16:09 »

Hello biomed12,

for a band pass 0-150 Hz You can use nearly any controller which can do
16 bit additions and multiplications in hardware.

I have not worked with dsPIC, but i have read that they use a lot of power.
Of course they should be able to run this bandpass.

I started my journey into DSP many years ago with the Motorola 56002.
This DSP has 3 address rooms on which he can work in one cycle.
One for the code and perhaps coefficients and two other for data.
At 80 MHz clock this gives a peak performance of 240 MLOPs.
This was not to bad for the time the 56002 arrieved.
Other DSPs have a similar architecture to achieve a good data throughput.

To access the data the 56002 has 8 address registers which hold
3 components: base, increment and modulo.
While the DSP operates on an array, this three components automagically
address the data for Your program.

There was a small framework for the eval kit which was sufficient to realize
Your own programs.
One part was the initialization of the DSP, the CODEC and other things.
The other part reads and writes the data to the codec with the speed of the samplerate
of the codec.
So to implement something with the DSP:

call init
loop:
call adda
do your calculations
goto loop

The subroutine adda also waits for the next occurence of the sample rate timer.
Thats all...

But, Your program must fit, in the matter of time, between the occurences of the sample rate.
Thats the way a DSP works. :-)


Best Regards
« Last Edit: September 26, 2016, 04:16:31 16:16 by h0nk » Logged
biomed12
Junior Member
**
Offline Offline

Posts: 52

Thank You
-Given: 37
-Receive: 3


« Reply #2 on: September 26, 2016, 04:27:55 16:27 »

Dear h0nk,

Thanks for your answers and sharing experiments. Do DSPs work concurrent like an FPGA or work sequential such as ordinary MCUs and CPUs? I understand that, there are some architectural differences in DSPs apart from others, some special registers and logical process parts...

Today, fortunately, one of my lecturer gave me a starter kit which is TMS3230C6416. This evaluation board is very expensive, 580 dolars on Digi-Key. I wonder that, there are 2 DSPs chip on this board, I could see... The value of those are about 160 dolars totally. So, suppose that, I have developed a filter whic is what I want and the development term will be ended. After, what will be? Will I write the pcb directly? So, I want to learn how can I program a single chip? Is there any special programmer or such tool?

Thanks.
« Last Edit: September 26, 2016, 04:33:10 16:33 by biomed12 » Logged
Sideshow Bob
Senior Member
****
Offline Offline

Posts: 457

Thank You
-Given: 160
-Receive: 494



« Reply #3 on: September 26, 2016, 05:47:51 17:47 »

That will all be answerd in the accompanying documents probably the one named manual. It could be in form of a hard copy or in digital fom on one of the CDs
Logged

I really am ruggedly handsome, aren't I?
intel
Senior Member
****
Offline Offline

Posts: 271

Thank You
-Given: 9
-Receive: 1087



« Reply #4 on: September 26, 2016, 06:14:43 18:14 »


The following links may be useful to you.

http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=SW300001
http://www.microchip.com/SWLibraryWeb/product.aspx?product=dsPIC%20DSC%20Equalizer%20Library
http://orca.cf.ac.uk/54726/1/U585115.pdf

Logged

In life, most genuine mentor is science.
h0nk
Active Member
***
Offline Offline

Posts: 120

Thank You
-Given: 90
-Receive: 83



« Reply #5 on: September 26, 2016, 06:16:39 18:16 »

Hello biomed12,

for the floating point range of TI-DSP's there a JTAG-adapters available.
Look for TI XDS-510 and XDS-560.

DSP's are not parallel in the sense of a FPGA could do it.
As i wrote, the 56002 could do 3 parallel computations in one cycle.
The TMS320C67 use a VLIW (very large instruction word) to do some parallel computation.

But, i would think that using such beasts would not do favour to You.

I would recommend for Your purpose a much smaller ARM M3 or M4.
Some of them already have a ADC and DAC on the chip.
In the moment i do some evaluation on the STM32L152.
This one has 12 bit ADC's and 12 bit DAC's ready on the chip.

For Your bandpass You need a minimum sample rate of 300 Hz.

So most of the time the DSP/controller has to wait for the next sample...


Best Regards
Logged
Sideshow Bob
Senior Member
****
Offline Offline

Posts: 457

Thank You
-Given: 160
-Receive: 494



« Reply #6 on: September 26, 2016, 10:03:31 22:03 »

.....Some of them already have a ADC and DAC on the chip.
In the moment i do some evaluation on the STM32L152.
This one has 12 bit ADC's and 12 bit DAC's ready on the chip.
For Your bandpass You need a minimum sample rate of 300 Hz.
So most of the time the DSP/controller has to wait for the next sample...
Best Regards
I beg to differ here. Given that it is this board we are talking about her http://www.ti.com/tool/tmdsdsk6416
This board is fitted with a 24bit stereo codec. It also have all that is needed for debugging on board. And also it will be shipped with a lot examples. In other words it will contain all that is need for this project. Maybe it is somewhat overkill. But that does not matter in this case as it is a student project

Logged

I really am ruggedly handsome, aren't I?
h0nk
Active Member
***
Offline Offline

Posts: 120

Thank You
-Given: 90
-Receive: 83



« Reply #7 on: September 26, 2016, 10:42:25 22:42 »

Hello Sideshow Bob,

i would assume that the filter is used in a graphical device for medical purposes.
So i expected that 12 bit should be sufficient. But who knows :-).

And since it starts at 0 Hz i would estimate that it should DC-coupled.
I know that some TI Codecs on other TI-DSP-boards allow this, but i would not
be sure that this is always the case.

And if the final design should be implemented in hardware and not as an
exercise on an evalboard, then i would not deal with the complexity of
a floating-point-DSP.

As an small proof i implemented a FIR-filter on a STM32L053.
Running at 32 MHz there was plenty of spare time waiting for the next sample
at a sample rate of 1 kHz.
The filter was a minimal phase 256 tap FIR calculated with gods (matlab) help.


Best Regards
Logged
Sideshow Bob
Senior Member
****
Offline Offline

Posts: 457

Thank You
-Given: 160
-Receive: 494



« Reply #8 on: September 26, 2016, 10:54:45 22:54 »

Hello Sideshow Bob,
i would assume that the filter is used in a graphical device for medical purposes.
So i expected that 12 bit should be sufficient. But who knows :-).
And since it starts at 0 Hz i would estimate that it should DC-coupled.
I know that some TI Codecs on other TI-DSP-boards allow this, but i would not
be sure that this is always the case.
This is an ECG project. But I do not know any more than that. I have looked at the schematics for board. And yes the stereo codec input is AC coupled. That is for sure not ideal in many ECG projects. But well let us solve one problem at the time. The AC coupling is quite simple so it may bypassedfor this project and restored later
Logged

I really am ruggedly handsome, aren't I?
Gallymimu
Hero Member
*****
Offline Offline

Posts: 579

Thank You
-Given: 101
-Receive: 151


« Reply #9 on: September 28, 2016, 03:13:47 03:13 »

I think it would be unusual to DC couple an ECG measurement.  There is no valuable information in the DC and it really causes problems (i.e. saturation) if not AC coupled.  This is one of the reasons many ECG systems use what is called a "right leg drive" which drives a small current to zero out the offsets in the isolation amplifiers (this is generally used in a mains connected ECG).

Here is a reference that indicates typical bandwidth of 0.5 to 100Hz.

http://www.analog.com/library/analogDialogue/archives/37-11/ecg.html
Logged
Sideshow Bob
Senior Member
****
Offline Offline

Posts: 457

Thank You
-Given: 160
-Receive: 494



« Reply #10 on: September 28, 2016, 04:36:45 16:36 »

The RLD is a tool in the toolbox to improve common-mode rejection in ECG. The ECG amp shown in your paper is still DC coupled per common definition of DC coupling. In Medical Instrumentation Application and Design, 4th Edition. John G. Webster. The recomandation for ECG is 0.01 to 250 Hz. But 0.5 to 100Hz may be good enough for say a bedside monitor. And if you only are looking for say extracting heart rate. AC coupling with corner frequency found in say sound cards does not matter
Logged

I really am ruggedly handsome, aren't I?
Gallymimu
Hero Member
*****
Offline Offline

Posts: 579

Thank You
-Given: 101
-Receive: 151


« Reply #11 on: September 29, 2016, 05:46:49 05:46 »

And if you only are looking for say extracting heart rate. AC coupling with corner frequency found in say sound cards does not matter

If I wasn't clear... that was kind of my point Cheesy
Logged
Sideshow Bob
Senior Member
****
Offline Offline

Posts: 457

Thank You
-Given: 160
-Receive: 494



« Reply #12 on: September 29, 2016, 11:33:52 11:33 »

If I wasn't clear... that was kind of my point Cheesy
By all means Wink, but maybe we should leave the scene to the original poster. He has been surprising absent recently
Logged

I really am ruggedly handsome, aren't I?
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC