DSP output to a real PIC pin??

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

Moderator: Benj

Post Reply
Dirk Bubley
Posts: 99
Joined: Fri Feb 02, 2007 3:54 pm
Location: Germany
Has thanked: 14 times
Been thanked: 12 times
Contact:

DSP output to a real PIC pin??

Post by Dirk Bubley »

Hello together,
Hello Matrix Team,

I´m trying to learn more aboud the DSP components and the related functions.

I started with the fequency Generator example and modified it.
In Simulation I see the result of my chances and manipulation. (Console window)

Question!! How can I map the results/calculations let´s say of DSP pulse Generator System to a real output pin of a PIC chip?

BR

Dirk

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: DSP output to a real PIC pin??

Post by Benj »

Hi Dirk,

Here I modified the signal generator example slightly by adding an output DSP component and using this to collect the value from the DSP chain and pass to a PWM component. By using a capacitor and a resistor you can create a simple low pass filter to filter out the high frequency PWM and create a simple DAC.
Attachments
FreqGen.fcfx
(10.88 KiB) Downloaded 360 times

Dirk Bubley
Posts: 99
Joined: Fri Feb 02, 2007 3:54 pm
Location: Germany
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: DSP output to a real PIC pin??

Post by Dirk Bubley »

Hi Ben,

many thanks for the support. After a short look it is more clear to me. now

I will check it out next weekend with the real pic chip.

BR

Dirk

organetic
Posts: 7
Joined: Tue Jul 29, 2014 6:45 pm
Has thanked: 1 time
Contact:

Re: DSP output to a real PIC pin??

Post by organetic »

Dear Benj,

Would you be so kind and let me know how to redirect the output from the frequency generator directly to a port?

My idea is to use these pulses to control stepper motors with pulse/dir drivers.

Also, what is the maximum frequency that this generator is capable to reach using arduinos?

Cheers!

Nuno

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: DSP output to a real PIC pin??

Post by Benj »

Hello,

You might be better off not using the DSP components to drive stepper motors. If you are using a stepper driver board that only requires direction and step signals then I would simply use two LED components to drive your outputs.

Using a timer interrupt you can establish a fixed speed to toggle your step signal and move the motor.

Post Reply