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.

External trigger pulse

Status
Not open for further replies.

maanas

Newbie level 6
Newbie level 6
Joined
Aug 14, 2009
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,379
I have been using PIC18 micro-controller for generating reference signal and a charging signal at 100 Hz rate max. Now I have to generate this charging signal after sensing an external trigger pulse of width 15us with frequency in between 1 to 100 Hz. I am using 4 timers of PIC18 for different purposes and one timer is spare.
I am thinking of using external interrupt on rising edge but how to check 15uS pulse width. I mean what if the external pulse only rises to logic high and doesn't go to logic low. How would I know that?
How to verify that the input pulses are in integer format only i.e. 1Hz, 2Hz and not 1.5Hz or any other values?
How to mark limit for sensing up to 100 Hz only?
 

Hi,

Is there a need to know it's length?

What happens if the pulse is only 14us?
What happens if the pulse is 16us?

Klaus
 

The pulse width is there to make it sure that false triggering does not occur.
 

You'll surely need to specify uselful limit values, e.g. accept 10 - 20 µs pulse width.

It's basically possible to measure short time intervals with timer capture function. Read the datasheet.

Similarly you need to decide about a reasonable pulse frequency filter criterion. "Integer frequency" doesn't sound meaningful. But a certain ms range for the pulse period together with a list of accepted pulse periods might work.
 

I have to generate a signal on every rising edge. Regarding integer frequency, I meant that if I am generating the required signal on every rising edge what if the input trigger pulse frequency changes from 10Hz to 20Hz (i.e. from 100ms to 50ms). What check should be done in order to generate the signal on every rising edge at the required frequency?
 

Hi,

If you need to generate the signal with rising edge, then how could you know how long the pulse will be?
You need to see into the future. Can you?

Klaus
 

After generating the signal on the first rising edge, the controller should check whether the second rising edge is within the limits i.e. (not less than 100ms). Only after that, signal will be generated by the controller.
Regarding 15us, as this was for avoiding false triggering, I am going to use a simple RC circuit such that spurious noise signals will not generate the external trigger signal.
 

Hi,

I´m really confused by your given values.

just the frequencies:
* ... a charging signal at 100 Hz rate max.
* ... with frequency in between 1 to 100 Hz
* ... i.e. 1Hz, 2Hz and not 1.5Hz ...
* ... for sensing up to 100 Hz only
* ... frequency changes from 10Hz to 20Hz

please give a complete specification. Best if you add a simple drawing of your signals, where you show the specified parameters. (like in every signal specifying datasheet)

And please give tolerances. Because you never will have a signal with an absolute frequency of 2.000000Hz without deviation (phase noise...)

Could you give an explanation why you need the integer frequencies? What is it good for?
1Hz is an integer frequency. it is 1000.000 ms in cycle time.
the next higher is 2Hz. it is 500.000ms (a step of 500ms)
...
99Hz is 10.101ms
100Hz is 10.000ms, the deviation now is just 0.101ms

If you want to give a tolerance of +/-1%, then at
1Hz the alowed time is: 99ms ... 101ms
at 100Hz: 9.9ms ... 10.1ms
but ...oops... 1% deviation is 99Hz or 101Hz. both are integer values... so at least 99Hz need to be alowed..
--> an 1% tolerance makes no sense. So better go to 0.01% tolerance??? this is just one microsecond.

Klaus
 
  • Like
Reactions: maanas

    maanas

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top