Lab Digital Filter

Status
Not open for further replies.

danadak

Well-Known Member
Most Helpful Member
Need a general purpose programmable filter in your lab. Here is a stand alone filter
you can use in your lab to do basic filtering. Its an 8 bit front end, but there are also
finished projects that do 16 and 24 bit versions.

This uses just a fraction of the resources onboard PSOC 5LP family part. Single chip.



The filter wizard helps you set up response you want, and then there is a small amount of code,
also already done in example, primarily to start the components, and to setup DMA. In PSOC
language a component is an onchip resource. This is entirely single chip except for a couple of
passives

Filter setup for LPF FIR -



Here is a BPF BIQUAD example (just using its wizard to set up) -





You can do BPF, LPF, HPF, Band Stop.

And there are lots of other onchip resources you can use for other tasks, ARM core, cntr, timer, pwm, LCD, logic, LUT,
state machine wizard,....... all with tons of prewritten APIs to use in your code.

Compiler and tool (PSOC Creator) free, board with nominal I/O $ 10 -



Here is code (already done in the example project) that it took to create. There
was also DMA code that was cut and paste from the DMA wizard to handle that,
again already supplied in example. As you can see most of the code was starting t
he various onchip components.

Code:
int main()
{
    /* Start all components used on schematic */
    ADC_DelSig_IRQ_Start();
    isr_StartEx(filterVDAC);
    ADC_DelSig_Start();
    ADC_DelSig_StartConvert();
    VDAC8_Start();
    Opamp_Start();
    Filter_Start();

    /* User-implemented function to set-up DMA */
    DMA_Config();

    /* Enable Global Interrupts */
    CYGlobalIntEnable;

    for(;;)
    {
    }
} /* End of main */

Regards, Dana.
 
Last edited:
Here is a version that does not use interrupts, so no CPU activity needed.



Regards, Dana.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…