Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to generate a precise pulse?

Status
Not open for further replies.

orion188

Newbie level 5
Joined
Jul 2, 2006
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,391
Hi.
I need to generate a 'precise' (or high resolution?) pulse as follows:

- The pulse should go to digital high state, exactly when the micro sets one of its output pins to 1.
- The pulse should remain high! for 'exactly' T us. And by exactly I mean less than, say, 10ns of error.

I know that this precision (resolution?) is not achievable using regular AVRs.
What do you suggest?
 

I know that this precision (resolution?) is not achievable using regular AVRs.
I know that it's possible. Using hardware timer OCR functionality, crystal accurate pulse widths with fclk resolution are no problem.
 
I know that it's possible. Using hardware timer OCR functionality, crystal accurate pulse widths with fclk resolution are no problem.

Thanks for your fast reply.
So you mean when I choose to work in OCR mode, some kind of logic circuit is built inside the avr that does not respect the input clock? Or you mean that it relies on the clock, but the clock is precise enough which introduces errors less than 10ns?

Sorry if questions are too basic, I've only worked with the internal clock of AVRs and have no experience with crystals and related stuff.
 

You didn't give a full specification. Using the internal clock, you'll mainly get an additional timebase error, but the pulses would be still timed exactly and reproducable.
 

To achieve 10ns accuracy the cristal base reference frequency need to above 50MHz( or the clock frequency of the micro). Another option might be an external high spped counter.
 

To achieve 10ns accuracy the cristal base reference frequency need to above 50MHz.
I don't agree. The original poster has been asking for 10 ns accuracy with us timing resolution. That's a difference.
 

@FvM

You didn't give a full specification. Using the internal clock, you'll mainly get an additional timebase error, but the pulses would be still timed exactly and reproducable.

Thanks man.
I think something is misunderstood here. I don't want to stick with the internal clock. If using a crystal gives me enough precision (err < 10ns), then I will definitely go for it.

So please tell me what exactly is the design you suggest?
- OCR with crystal?
- OCR with internal clock?
- another solution?

---------- Post added at 11:07 ---------- Previous post was at 10:55 ----------

@HTA
Another option might be an external high spped counter.
Thanks. Yep, I think if we come to the conclusion that a micro can't give me that precision, I'll go for an external counter.
 

If you require a crystal accurate clock depends on the acceptable relative timing error, which can be easily calculated from your specfication. Simply assume numbers of +/- 50 ppm for a crystal compared to +/- 1-2% for the internal AVR oscillator. So if you want 10 ns accuracy for more than 1 us pulse duration, you'll need a crystal. It keeps 10 ns over about 200 us for a standard crystal. The reproducability will be better in both cases.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top