How to use port B interrupt and RTCC interrupt at the same time?
yanss00
Posts: 5
How to use port B interrupt and RTCC interrupt at the same time?For example, i want a pin of port B to detect a falling edge as to generate a interrupt, at the same time ,I want the RTCC to increse from $00, when the next falling edge comes, the former interrupt ends and a new interrupt generates. Then, I want to·get the·state of RTCC between the two interrupts. What should I do to do this? Is there anything special I should pay great attention to?
Thank you !!
I will be very apperiate if a superior can help me to solve the problem .
My email :yanshaoshi@nudt.edu.cn
Thank you !!
I will be very apperiate if a superior can help me to solve the problem .
My email :yanshaoshi@nudt.edu.cn
Comments
However, there are a few special things that you need to pay attention to. Full details are in the SX-Key manual under the heading of interupts. You need to read these, as I cannot remember specifics for this subject, however from what I do recall SX can only handle one interupt at a time. An interupt will cause a jump to program memory $00. No other interupt will be serviced until after a reti instruction.
The manual is very good. I only ever found 1 conflict of information, and a few minutes experimentation sorted that. Maybe it has been fixed in later versions.
I think there mabe some other language options for you, not wishing to cast dispertions on you English, which is obviously far better than my Japanese or French. The Parallax people may be able to direct.
And now to my English. Is interupt spelt with 1 or 2 r's?
Bongo
There are two r's in interrupt.
Yans00,
Multiple interrupt sources are a real problem on the SX chips. The problem is that if a new interrupt comes in while the SX is already in the interrupt handler, then the new interrupt will be lost. You can read about it in more detail here:
www.parallax.com/sx/support_faqs.asp#Question%20#6
Thanks, PeterM
· It sounds like to just want to measure the time between the two PORTB interrupts ?
· In that case you don't need an RTCC interrupt, unless RTCC will overflow.
·
· Can you provide more details ? Like what would be the mimimum and maximum time between interrupt.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Coming soon... Cheap 4-digit LED display with driver IC·www.hc4led.com
"Sometimes it is better to remain silent and be thought a fool, than to speak and remove all doubt."
·
I think I have solved my problems after reading the manual .
You are all very kind person, thank you once again!!
"Sometimes it is better to remain silent and be thought a fool, than to speak and remove all doubt."