Synchronize red pitaya with arduino

Placement, modules, components and accessories; the ones that exist and the the nice-to-be's
Post Reply
f_sat
Posts: 8
Joined: Thu Mar 23, 2023 6:31 pm

Synchronize red pitaya with arduino

Post by f_sat » Thu Jun 01, 2023 5:19 pm

Hi, for a project I need to generate 3 PWM to control 3 motors, but the Red Pitaya can only generate 2, so I have decided to use an arduino as an intermediary only for this, however I don't know how to synchronize it with the red pitaya to control from those pwm.

My other option is to use the gpio to generate the pwm but I don't think it's as simple as doing this:


rp_DpinSetDirection(RP_DIO5_N, RP_OUT);

rp_GenReset();
rp_GenFreq(RP_DIO5_N, 20000.0);
rp_GenAmp(RP_DIO5_N, 1.0);
rp_GenWaveform(RP_DIO5_N, RP_WAVEFORM_PWM);
rp_GenOutEnable(RP_DIO5_N);

I have little experience in this but I hope you can help me and advise me, thank you.

User avatar
redpitaya
Site Admin
Posts: 880
Joined: Wed Mar 26, 2014 7:04 pm

Re: Synchronize red pitaya with arduino

Post by redpitaya » Fri Jun 02, 2023 10:51 am

Perhaps by using UART, SPI, or I2C communication as an intermediate for sending commands.
Do not forget to connect the "Ext. common mode GND" to the Arduino GND pin.

Bulova
Posts: 111
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Re: Synchronize red pitaya with arduino

Post by Bulova » Fri Jun 02, 2023 8:45 pm

Hello,
as far as I know, even the Arduino Uno itself can provide six PWM channels.

Best regards

Dieter

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 28 guests