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.

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.

1623099573377.png


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 -

1623099728929.png


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


1623100004693.png



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 -

1623100214958.png


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.

Latest threads

New Articles From Microcontroller Tips

Back
Top