PWM in analog extension

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

PWM in analog extension

Post by f_sat » Mon May 29, 2023 5:42 pm

Hi, I want to generate 3 pwm to be able to control 3 brushless motors, since the pitaya only has 2 RF outputs, I thought about using the analog outputs of the extension connector, is it possible? And if so, just change the name of the pin in the code? For more information I am using the C code of the function generator.

Ej.

rp_GenFreq(RP_CH_1, 20000.0); // I only have to change "RP_CH_1" for the name of the analog pin?

Thanks

juretrn
Posts: 104
Joined: Tue Nov 16, 2021 11:38 am

Re: PWM in analog extension

Post by juretrn » Tue May 30, 2023 9:12 am

The slow analog outputs are not meant for generating this sort of signal, but for creating a slowly changing (or static) DC reference.
I think the best idea would be to use the GPIO pins to create a PWM signal.

f_sat
Posts: 8
Joined: Thu Mar 23, 2023 6:31 pm

Re: PWM in analog extension

Post by f_sat » Wed May 31, 2023 12:56 am

I see, thanks, any idea how do this with GPIO?

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

Re: PWM in analog extension

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

The best way is to reprogram the FPGA logic of the GPIO pins to have them function as PWM pins.

The settings can be changed by writing into specific registers using C.

Here are a few tutorials that might be useful:
https://lniv.fe.uni-lj.si/redpitaya/
https://redpitaya.com/teaching-materials/

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 21 guests