Forum Rule: Always post complete source code & details to reproduce any issue!
-
PWM signal on teensy 2.0++ in C
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 by ashitakalax; 11-08-2012 at 06:57 PM.
Reason: better formatting
-
I figured it out I'll post a larger solution upon my completion for the next users.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules