Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Is it possible to set an interrupt procedure within another interrupt procedure? For example, I am reading data from one sensor, and want to read data from a second sensor simultaneously.
You can normally read as many sensors as you wish during an interrupt routine. Are you asking about re-entrant interrupts? Multiple interrupt sources? A timed interrupt that poles sensors?
I'm working with an incremental encoder and a contact sensor, and need to keep count of both (I need to know the duration of contact until a critical angle is reached) I'm working with a PIC16F87XA. Apologies for my imprecisions. I remain available to supply you with what further information I can.
How fast, in pulses per second, could your encoder run at maximum speed?
Is your encoder 2 phase - can you tell which way it turns?
What time range can your contact sensor produce?
What speed are you running your 87X?
The reason I ask is that most mechanical systems are sooo slow compared to a pic that timed polling is normally sufficient.
I'm not sure what polled timing is, but we decided to use a potentiometer instead. It is easier to work with absolute angular position, and it offers enough precision for my application.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.