EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

handling interrupts

Started by Radha_Purnima September 2, 2008
how exactly are the interrupts get served in the real time embedded
products like a washing machine,refrigirator?

is it like, we will write a program where we continuously check a
particular status bit of the device has been set or not...or those
interrupts will be hard wired to a interrupt pin (INT pin kind of)??

if it is hard wired how a variety of divices are connected to that
particular pin and how exactly the interrupt by a particular device get
serviced??




Radha_Purnima wrote:
> how exactly are the interrupts get served in the real time embedded > products like a washing machine,refrigirator? > > is it like, we will write a program where we continuously check a > particular status bit of the device has been set or not...or those > interrupts will be hard wired to a interrupt pin (INT pin kind of)?? > > if it is hard wired how a variety of divices are connected to that > particular pin and how exactly the interrupt by a particular device get > serviced??
Different developers will use different strategies. Modern microcontrollers have a very rich set of peripherals built in, and the trend is toward each peripheral having its own vectored interrupt, often with more than one general purpose IO pin sourcing unique interrupts also. In operation, each one of these interrupt sources is serviced by its own interrupt service routine. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html

Radha_Purnima wrote:
> how exactly are the interrupts get served in the real time embedded > products like a washing machine,refrigirator?
What interrupts? Appliances like washing machines use mechanical timer with camshaft and set of switches. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On 2008-09-02, Vladimir Vassilevsky <antispam_bogus@hotmail.com> wrote:
> > > Radha_Purnima wrote: >> how exactly are the interrupts get served in the real time embedded >> products like a washing machine,refrigirator? > > What interrupts? > Appliances like washing machines use mechanical timer with camshaft and > set of switches.
Some do. Some use microcontrollers. -- Grant Edwards grante Yow! This MUST be a good at party -- My RIB CAGE is visi.com being painfully pressed up against someone's MARTINI!!
In article <D4GdnVtyvqmLsSDVnZ2dnUVZ_obinZ2d@giganews.com>, 
chinnari_dasari@yahoo.co.in says...
> how exactly are the interrupts get served in the real time embedded > products like a washing machine,refrigirator? > > is it like, we will write a program where we continuously check a > particular status bit of the device has been set or not...or those > interrupts will be hard wired to a interrupt pin (INT pin kind of)?? > > if it is hard wired how a variety of divices are connected to that > particular pin and how exactly the interrupt by a particular device get > serviced??
What makes you think a refrigerator or washing machine even uses any type of interrupt at all? What devices would NEED to be interrupt driven in such a usage? What do you think is happening in your fridge that is so transient/fast that a simple polling loop wouldn't suffice? What is going on in your fridge that would even require an MCU? Mine gets along just fine with a simple mechanical thermostat and a switch that (I think, I'm not really sure, it might stay on all the time.....) turns off the light when the door is closed. Same questions about your washer. These are things that need to be answered before I would go about asking particulars about hardware implementation. Running late on your homework? You must define the domain of the problem BEFORE you ask for an answer.
On Tue, 02 Sep 2008 07:05:42 -0500, "Radha_Purnima"
<chinnari_dasari@yahoo.co.in> wrote:

>is it like, we will write a program where we continuously check a >particular status bit of the device has been set or not...or those >interrupts will be hard wired to a interrupt pin (INT pin kind of)??
When the micro code has finished executing the previous instruction, the microcode checks if any interrupt requests are active. If not, the operation code pointed by the program counter is fetched, decoded and executed. However, if some interrupt is set, the micro code will save the context (typically the program counter and some registers) on the stack and then fetch an address from a known address (in the interrupt vector) and load it into the program counter. After that, the micro code will proceed normally. Paul
Vladimir Vassilevsky wrote:
> > > Radha_Purnima wrote: >> how exactly are the interrupts get served in the real time embedded >> products like a washing machine,refrigirator? > > What interrupts? > Appliances like washing machines use mechanical timer with camshaft and > set of switches. >
It's been a while since you took one apart, eh? Microprocessors are insinuating themselves even into wash machines and dishwashers. Soon all the old farts in the world will have to live in special homes with resident 13-year olds to program all their appliances, not just their VCRs. It's a plot. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html

Tim Wescott wrote:

> Vladimir Vassilevsky wrote: >> Radha_Purnima wrote: >> >>> how exactly are the interrupts get served in the real time embedded >>> products like a washing machine,refrigirator? >> >> What interrupts? >> Appliances like washing machines use mechanical timer with camshaft >> and set of switches. >> > It's been a while since you took one apart, eh? > Microprocessors are insinuating themselves even into wash machines and > dishwashers.
Oh dear. Poor users. Does it have the operating system, too?
> Soon all the old farts in the world will have to live in > special homes with resident 13-year olds to program all their > appliances, not just their VCRs. > > It's a plot.
It loos more that the things are going into the opposite direction: only the old farts can fix gadgets and vigets of young suckers who haven't got a slightest clue. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Tue, 02 Sep 2008 17:35:32 -0500, in comp.arch.embedded Vladimir
Vassilevsky <antispam_bogus@hotmail.com> wrote:

> > >Tim Wescott wrote: > >> Vladimir Vassilevsky wrote: >>> Radha_Purnima wrote: >>> >>>> how exactly are the interrupts get served in the real time embedded >>>> products like a washing machine,refrigirator? >>> >>> What interrupts? >>> Appliances like washing machines use mechanical timer with camshaft >>> and set of switches. >>> >> It's been a while since you took one apart, eh? >> Microprocessors are insinuating themselves even into wash machines and >> dishwashers. > >Oh dear. Poor users. Does it have the operating system, too? > >> Soon all the old farts in the world will have to live in >> special homes with resident 13-year olds to program all their >> appliances, not just their VCRs. >> >> It's a plot. > >It loos more that the things are going into the opposite direction: only >the old farts can fix gadgets and vigets of young suckers who haven't >got a slightest clue. > > >Vladimir Vassilevsky >DSP and Mixed Signal Design Consultant >http://www.abvolt.com
Hey, do you want to share that beer:) martin
On Tue, 02 Sep 2008 07:05:42 -0500, "Radha_Purnima"
<chinnari_dasari@yahoo.co.in> wrote:

>how exactly are the interrupts get served in the real time embedded >products like a washing machine,refrigirator? > >is it like, we will write a program where we continuously check a >particular status bit of the device has been set or not...or those >interrupts will be hard wired to a interrupt pin (INT pin kind of)?? > >if it is hard wired how a variety of divices are connected to that >particular pin and how exactly the interrupt by a particular device get >serviced?? > > >
A simple state machine, run some moderate number of times per second, can check all input and output levels and decide what to do. It may be run by a periodic interrupt, or it may just pace itself with a wait loop. Interrupts from hardware inputs, like pushbuttons maybe, are often more trouble than simple polling from within a state machine. And proper periodic polling can give you debouncing for free. John

The 2024 Embedded Online Conference