Programming ULP at runtime to make arbitrary function generator

schristy
Posts: 1
Joined: Sun Nov 18, 2018 8:33 pm

Programming ULP at runtime to make arbitrary function generator

Postby schristy » Sun Nov 18, 2018 8:54 pm

I know a lot of people use microcontrollers for low power applications and the ESP-32's ULP processor is very useful for saving battery. However, it can also be used as a third processor for controlling GPIO logic or for signal acquisition. In my case I wanted to use it as a signal generator due to it having a very simple instruction set that includes a delay clock cycles function, I felt it would be perfect for this. As it turns out it is very easy to program at runtime thanks to the ULP C macro library.

I made an example of how it might be used to create a simple PWM. The example dims the onboard LED connected to GPIO2 by using ULP to drive it at 100Hz with a duty cycle of 1%.

I think it should be very easy to create arbitrary wave forms of any kind, and plan to use this in my current project. I figured I'd share it with others in this early form before ends up getting specialized for my use. Here is the link:

https://github.com/StevenChristy/Espres ... rogrammer/

tiradedepirate
Posts: 12
Joined: Tue Jan 15, 2019 5:12 am

Re: Programming ULP at runtime to make arbitrary function generator

Postby tiradedepirate » Tue Jan 22, 2019 5:19 am

Cool! Nice work!

Who is online

Users browsing this forum: No registered users and 21 guests