Home
Help
Search
Login
Register
Welcome,Guest. Please
login
or
register
.
OverUnity Research
>
DIY Test Equipment & Projects
>
DIY Oscillators
>
uC controlled signal generator ?
2025-05-19, 05:58:29
News: A
feature is available which provides a place all members can chat, either publicly or privately.
There is also a "Shout" feature on each page. Only available to members.
1 Hour
1 Day
1 Week
1 Month
Forever
Pages: [
1
]
« previous
next »
Author
Topic: uC controlled signal generator ? (Read 21554 times)
Topic Options
forest
uC controlled signal generator ?
«
on:
2014-03-29, 19:15:46 »
Sr. Member
Posts: 479
Hi
I need a little help from electronic guru experienced with AVR microprocessors. I learned Arduino and then found a way to use also Attiny45/85 chip and I want it to generate square wave. I tried the simplest way , setting digital output to HIGH or LOW with a simple delay_us() between. That way I can modify duty cycle and impulse time also. Seems to work fine but for higher frequency above 10khz I see on scope some echo signal . I have a feeling that it's because of time drift of delay_us function not representing exact time in microseconds.
Any way to make a reliable stable sharp square wave using Attiny45 with external 16mhz clock ? Any example ?
Peterae
Re: uC controlled signal generator ?
«
Reply #1 on:
2014-03-29, 19:20:27 »
Group: Administrator
Hero Member
Posts: 4024
I've never used the AVR I'm all Pic micro
Surely it has a PWM dedicated unit you setup? you should be able to set Freq & Duty maybe.
forest
Re: uC controlled signal generator ?
«
Reply #2 on:
2014-03-29, 19:21:42 »
Sr. Member
Posts: 479
Ok, so the solution is to use PWM ? If so then well...I have to learn how.
Good to know, please confirm if I guessed
Peterae
Re: uC controlled signal generator ?
«
Reply #3 on:
2014-03-29, 19:26:44 »
Group: Administrator
Hero Member
Posts: 4024
Well first you need to check that it has a built in PWM unit, then you should be able to google how to use it, not all Pic's have them but a lot do.
The trouble with trying to do it in software is that you need to be quiet experienced, i would work out my instruction execution times and calculate my max frequency using the instruction execution time.
Just 1 instruction can slow you down a lot.
So easiest is to use PWM unit
Matt Watts
Re: uC controlled signal generator ?
«
Reply #4 on:
2014-03-30, 17:50:14 »
Group: Guest
It's a bit more costly, but has flexibility to go in whatever direction is truly needed:
http://open-source-energy.org/?topic=1334.0
I call it my SuperPulseGen. Uses a Cypress PSoC 5 LP development kit and supports six channels each with phase, frequency and duty cycle control. Good throughout the kilohertz range.
The good news is that there are now several PSoC 5LP platforms this can be moved to that are far less expensive.
Peterae
Re: uC controlled signal generator ?
«
Reply #5 on:
2014-03-30, 17:57:35 »
Group: Administrator
Hero Member
Posts: 4024
Nice project there Matt
Here's one i designed and built to look into phase delayed pulses.
http://www.overunityresearch.com/index.php?topic=31.msg36381#new
Pages: [
1
]
« previous
next »
Home
Help
Search
Login
Register