PDA

View Full Version : Precision Pulse



matth
- 27th April 2005, 19:33
I need a precision pulse generator. I want a PIC to generate a precision low output exactly once a second. The active low pulse needs to be about 120 microseconds long and must occur exactly once a second. Well pretty darn close to exactly. Is this possible with Picbasic?

Which PIC has a built in high stabillity oscillator by the way to keep component count down?

Also, later I may input an external GPS pulse into the PIC to keep it more accurate. How hard would that be?

Matt

Archilochus
- 27th April 2005, 19:40
Hi Matt,
I don't think any built-in osc is going to get anywhere near 'precise'. You'll need to use an external crystal. (unless there are some new pics out...)

Arch

Acetronics2
- 27th April 2005, 19:42
Hi, matt

Precision ... ok. but this doesn't mean nothing !!!

How much !!!!

Alain

Dwayne
- 27th April 2005, 20:05
Hello Matth,

M>>I want a PIC to generate a precision low output exactly once a second. The active low pulse needs to be about 120 microseconds long and must occur exactly once a second.<<

Assuming the low pulse is 5 volts.

TRISB=%00000000
Loop:
Portb.0=1
pauseUS 120
Portb.0=0
pauseUS 880
goto Loop

Get a accurate scope and measure it... if it needs to be adjusted, adjust the pause that you want.

Dwayne