
![]() |
Stackables
|
![]() |
||||||||||||||||||||||||||||||||
|
The Quub system allows for up to 9 (expandable to 16) daughter boards to be stacked with the processor board. These daughter boards are known as "stackables". Stackables are normally the same size as the processor boards (1.8x1.8") however they can be larger if required. A range of stackables are currently being designed.
All these stackables are addressable, so any combination can be used at the same time, for example you could have a system with 9 stackables to give access to 100s of inputs and/or outputs on a single Quub system. Then of course you can network Quubs for more IO or use stackables that handle more IO. Smart stackables can often also be used as stand-alone processors and as Arduino clones, this allows them to be used for applications such as simple meters and data loggers without the full Quub stack overhead.
|
||||||||||||||||||||||||||||||||||
| Stackable "backplane" | ||||||||||||||||||||||||||||||||||
|
Any number of stackables can be stacked and they can be mounted above and/or below the processor board (subject to the type of connectors loaded). See the backplane page for more information.
|
||||||||||||||||||||||||||||||||||
| Addressing modes | ||||||||||||||||||||||||||||||||||
|
Dumb logic. Not addressable, just 32 IO lines read directly by the
processor. In this mode all 32 IO signals are available to a stackable.
Multiple stackables can be mounted but normal signal-clashing issues
apply so if all 32 IO signals are used by a board no others can be mounted
on the stack.
Stackables using this mode can co-exist with smart stackables as long as the dumb board doesn't use the IO-00:07 backplane signals. In this case only 24 IO signals are available to the dumb stackable. Under some circumstances fewer IO signals may be available, it depends on the configuration of the core processor and other stackables. Dumb logic. Addressable using SCC (Stackable Control Chip), number of IO lines used depends on the design but all must be tri-stateable so boards can share signals.
Stackables using this mode can co-exist with smart stackables as long as the dumb board doesn't use the IO-00:07 backplane signals. In this case only 24 IO signals are available to the dumb stackable. Under some circumstances fewer IO signals may be available, it depends on the configuration of the core processor and other stackables. IO expander chips can use the SPI interface the same as a smart stackable, in this case 24 IO signals are available. Addressable with co processor. This mode uses up to 8 backplane signals.
Up to 9 smart stackables can be mounted and the remaining 24 backplane
signals still are available for use by dumb stackables.
If a co processor does not use interrupts only 5 backplane signals are used, 2 for the SCC chip and 3 for the system, SPI. Another 3 signals are used if the co processor does use interrupts.
|
||||||||||||||||||||||||||||||||||
| Stackable addressing | ||||||||||||||||||||||||||||||||||
Smart or dumb stackables can also be addressed by the processor using "smart addressing'. The processor uses a simple algorithm to address stackables and the stackable board has to have a decoder chip installed. The algorithm can accommodate any number of stackables, however a limit of 9 has been set with provision for expansion to 16. This feature uses three of the available IO signals. Stackables do not have to be addressable to work in the system and both addressable and non-addressable boards can coexist as long as the IO signals they use don't clash. Stackables can be dumb IO boards or intelligent co-processors. How does it work? To be addressable a stackable must have a decoder chip installed, this is a custom chip (a pre-programmed ATtiny85) known as the Stackable Control Chip or SCC.
The SCC pins functions are as follows.
Trinary encoding
Control byte
The lower 4 bits of the control byte are the address, of which only 9 addresses are used by the current SCC design. If the SCC determines that the control byte is intended for it the next three bits will be written directly to the BRDEN, DBGEN and BRDCNTL pins. Operation When the entire byte is received the addressed SCC will lower BRDEN and by extension also SSACK. The entire context switch then occurs in 8 cycles of the SSCLK signal. What happens on the stackable board? On a intelligent stackable with a processor this would normally mean disabling the SPI pins , this is most easily done by routing the BRDEN signal to the co-processor's SS pin. If the board uses an IO expander chip it will also have an SS (or CS) pin that will serve the same purpose. On a dumb board tri-state buffers will be disabled.
|
||||||||||||||||||||||||||||||||||
| Stackable interrupts | ||||||||||||||||||||||||||||||||||
|
Interrupting may or may not be faster than polling, it depends on the number of stackables and all sorts of system requirements, however there are many situations where interrupting makes sense, for example.
How does it work? A slave processor interrupts the core by lowering the INTREQ backplane signal, and waiting for INTACK to also go low indicating that the core processor is ready to service the interrupt. The slave then places its priority level (allocated previously by the core processor) onto the three SPI signals MOSI (IVECT-00), MISO (IVECT-01) and SCK (IVECT-02) with the proviso that only those priority bits that are low are driven, any high bits are left as inputs and are therefore at a high-impedance state. This allows multiple slaves to interrupt at the same time, with the priority having the lowest number winning because any 0 bit will override a 1 bit. Having acknowledged the interrupt the core processor monitors the IVECT signals waiting for them to change from the default value of 7 (all high) to any other value. When they do it reads the value from the IVECT signals then raises INTACK and waits for the IVECT signals to return to their default value, indicating that the slave has "acknowledged the acknowledge" by sending all it's IVECT signals to a high-impedance state. The IVECT value is then used to select the interrupting stackable and a poll is performed to get whatever data was considered so important. Because the default (un driven) state for the three IVECT lines is high the value 7 is read from them when no slave is driving the signals, therefore vector 7 cannot be allocated as an interrupt priority because it is not discernable from the default state. Therefore although 9 smart stackables can be addressed, only 8 of them can be enabled to interrupt the core processor.
|
||||||||||||||||||||||||||||||||||
| Stand-alone stackables | ||||||||||||||||||||||||||||||||||
|
Current designs use an ATmege8 as the processor, however this is pin-compatible with the ATmega168 and 328 so an application that requires more memory can use the same stackable with a more powerful processor.
|
||||||||||||||||||||||||||||||||||
All electronics information and designs on this site is released
under the Creative Commons CC BY-SA and/or Open Hardware licences.


![]() |