|   |
![]() |
||||||||||||||||||||||||||||||||||||||
Home |
Because all Slaves are placed in parallel on the SB-Bus they can't help receiving all commands and data from the Master.
Therefore we need a way to address a particular Slave before sending commands.
Only the selected Slave is allowed to obey to the commands, all other Slaves have to ignore all incoming characters.
Communication on the SB-Bus is done with 8-bit characters, although we only use the standard 7-bit ASCII codes for normal communication. Bit 7 of normal characters is always "0". When bit 7 is "1" it is obviously not a normal ASCII character, and will be interpreted as an address by all Slaves.
Address values range from 128 to 255.
Considering 2 special cases this will give us a maximum of up to 126 addressable Slaves on one single SB-Bus.
Whenever a Slave receives an address it must flush its input and output buffers and cancel all activities on the SB-Bus immediately.
This is even true if a selected Slave receives its own unique address again.
The Slave that received its own unique address is now selected and must respond with an OK prompt => within 0.5 seconds.
After sending the OK prompt the Slave will wait for further instructions given by the Master.
At the same time all other Slaves are excluded from conversation.
I have defined some address ranges for different types of equipment.
Please note that this is only a recommendation, made by myself to make it easier to remember addresses for all the devices that are connected to the bus.
You are totally free to create your own address map.
One of the required properties of the SB-Bus is that it must be able to control it with a normal terminal program.
Therefore we need a way to send addresses to the bus.
Usually this can be done using the ALT key and the numeric keypad on your computer.
The trick is to type the ASCII code on the numeric keypad while holding down the ALT key.
You may have to experiment a little to get it going, because some systems require only the 3 digit code to be typed, while others need a 4 digit code.
In case your system requires you to type a 4 digit code, you must add a leading 0 before typing the 3 digit code.
Examples: ALT-170, ALT-255, ALT-0130, ALT-0150 Most notebook computers don't have a dedicated numeric keypad. But they usually do have a NUM-LOCK key, which transforms part of the Alpha keyboard to a numeric keypad. In that case you should first engage the NUM-LOCK function, then type the ALT-code of the address you want to send. Don't forget to disengage the NUM-LOCK function after sending the address.
If you're not able to send addresses this way you may have one last option to send addresses with your terminal program.
You may save a file to your hard disk containing only a single byte, which is the address you want to send.
A Slave must know its own address, otherwise it has no way of knowing when it is selected on the bus. I can think of 3 ways to tell the Slave what address it has. You can pick the appropriate method for your own Slaves, depending on its resources and the trouble you want to spend on writing the software. Hard Coded Address
By far the easiest way to let the Slave know its own address is to hard code it into the program memory.
The disadvantage of this method is that you'll have to re-compile the entire program if you want to change the address for whatever reason (for instance if you want to connect two identical devices to the same bus).
Hard Wired Or Half Hard Wired Address
One way to overcome the difficulty of changing the address is to (Half) Hard Wire the Slave's address.
A Hard Wired address is entirely or partially wired through some I/O pins of the processor.
That way we overcome the difficulty to change the address in an easy way.
Soft Coded Address
Soft Coded addresses are obviously the most flexible solution.
A Soft Coded address is stored in the Slave in so called Non Volatile Memory.
This can be a RAM memory with battery backup, or it can be some kind of EEPROM device.
I²C EEPROMs are very cheap nowadays, and even more and more microcontrollers come equipped with plenty of EEPROM memory inside.
|
||||||||||||||||||||||||||||||||||||||