ArdweeNET forum

BUSnet (old version of this network, no longer active) => Protocol => Topic started by: Graynomad on February 11, 2011, 11:12:27 AM



Title: Interrupts, do we need them?
Post by: Graynomad on February 11, 2011, 11:12:27 AM
At present the spec allows for interrupts which in a nutshell means that a Node can jump the queue and be serviced before it would normally be in the course of the MCU's scheduled polling.

However the mechanism for interrupt requires that a Node detect bus clashes at the bit level, this in turn means that the phyisical layer has to be a form of open collector whereby the line is not actively driven for a recessive bit, rather pulled by a resistor.

This places some limits on the type of 485 tranceiver used and/or means wiring a tranceiver in a non-standard way. All of which I'm fairly happy with, but do we need interrupts at all?

The idea of them is mostly to allow real-time reponses, say when you switch a light on. If there are a lot of Nodes on a slow network it may take a second or two for the light to actually come on. Some thoughts on this

a) What would the worst case delay be, maybe it's not really a problem
b) Are there any real issues with a short delay in the first place
c) Could this be handled by simply allocating priorities and polling some Nodes more often than others



Title: Re: Interrupts, do we need them?
Post by: Graynomad on March 19, 2011, 12:07:24 AM
I've answered this myself, and the answer is no (unless someone can convince me otherwise).

I came to this conclusion mostly because of the change to RS-485, interrupts need the ability to detect a bitwise bus clash and that's harder to do with 485 than an open-collector system like LIN.

I'm hoping that a good polling algorithm with priorities assigned to Nodes will make the system appear "real time" to a human.

I still like the idea though...