PWM signal on teensy 2.0++ in C

Status
Not open for further replies.

ashitakalax

New member
Hi,

I'm in the process of trying to generate a PWM signal on the Teensy 2.0++. I would like to use C code, since the rest of my 2000+ lines of code are in C. I'm also using WINAVR to compile my code.

Does anyone know a "simple" way to generate a PWM on ardunio pins 27, 0, 1, physical pins B7, D0, C4, C5, C6?
I have seen the PJRC arduino analog write code/analog tutorial2(mid page) " arduino-x.x.x\hardware\arduino\cores\arduino\wiring_analog.c", this is ideal for generating a PWM signal for me. but this code was meant for non teensy boards.
Does anyone know where I can find the equivalent of this in teensy 2.0++?

or is there a way to import the arduino library into c code? (i know the libraries are in C, but i'm just a little lost as to how to add it to my code)

I've checked the "arduino-x.x.x\hardware\teensy\cores\teensy\" directory and i'm a little lost.

Thanks
 
Last edited:
Status
Not open for further replies.
Back
Top