1Hz - 50 Khz pulse generator - 1 Hz steps - PIC micro

Thread Starter

nero

Joined Jan 4, 2007
2
Tired of wiring a 555 in astable mode every time I do ocassional breadboarding, started to consider programming a PIC to get this:

1) - 50% duty cycle pulses with frequency going from 1 Hz to 50 KHz with increment in 1 Hz steps.
2) - Selection of frequency with small keyboard and display.
3) - No PLL techniques involved!
4) - At a 2nd stage: variable duty cycle
5) - At a 3rd stage: single/repeted burst signals with number of pulses selected at will.
6) - At a 4th stage: frequency sweeping capability

Have already considered PWM but for low frequencies pulses I need a quite slow clock while for high frequency pulses I need the opposite.

Should I go the timers way? Deffinitely no previous experience on this.

I am not asking anyone to design anything for me. Just minimal guidance (simple comments if you like) showing what to consider to avoid false starts. The few (two) designs found after googling, explained nothing.

Recall one design in Radio Electronics where the PIC micro changed somehow its own clock to cope with frequency changes.

Just in case you ask, no $$$ to afford any decent pulse generator here.

Thanks for that.
 

beenthere

Joined Apr 20, 2004
15,819
Hi,

You should be able to do all that with just the PIC. All ya gotta do is get the timing for loops, like incrementing from 0 to 255, and run nested loops to get all that timing. Gets a bit tedious, though.
 

Dave

Joined Nov 17, 2003
6,969
You should be able to use the Timer modules on the PIC to achieve what you want. The Timer modules are effectively 8/16-bit counters with prescales to achieve the frequency you require. The more advanced PICs will have more Timer modules some for use with PWM. I would suggest you look over at microchip.com for the datasheet of the PIC you propose to use to see what capabilities it has for your needs.

Dave
 
Top