PDA

View Full Version : 12F683 trailing and rising edges in option_reg



AvionicsMaster1
- 24th May 2011, 17:33
What advantage is there to using trailing vs. rising edge interrupts?

in the option_reg line you can

bit 6 INTEDG: Interrupt Edge Select bit
1 = Interrupt on rising edge of INT pin
0 = Interrupt on falling edge of INT pin

bit 4 T0SE: Timer0 Source Edge Select bit
1 = Increment on high-to-low transition on T0CKI pin
0 = Increment on low-to-high transition on T0CKI pin

So why would you use one over the other?

If there is something I should have read please send a link but nothing I've seen gives a reason for either.

Darrel Taylor
- 24th May 2011, 22:53
Here are some interactive examples of Rising/Falling edge differences.

http://www.darreltaylor.com/DT_INTS-14/hello.html

Archangel
- 25th May 2011, 02:04
As Usual, Very good (Great?) treatise on the subject. And Thank You !;)
Have you ever thought about assembling these little training aids into a course
in programming ? I think 1000 words would not explain rising and falling edge so eloquently. You have put a lot of work into these, I hope everyone is grateful for them, I am.

Darrel Taylor
- 26th May 2011, 00:02
Thanks Joe,

Yes I've thought about it. Started it. Then never finished it.
There's always the NEXT problem to solve, and that's what I like doing.

Putting hundreds of hours into something I've already figured out, doesn't stand much of a chance.

Now that I get new problems every day ... even less of a chance.

mister_e
- 26th May 2011, 00:57
Old saying: There's no problems... only learning opportunities...

AvionicsMaster1
- 26th May 2011, 14:02
Thanks. Nicely done and illustrated.