Simple Serial Bus
Valloxserial.netSimple.Net application to monitor vallox serial bus activity.Connect the RS485 bus of the vallox ventilation device to your computerusing a standard RS485 to USB Converter (2 wires A and B are needed).Start the application, choose the right COM port and connect.Now the application receives all messages from the bus and tries to interpret the data.The received data is printed to the output window of visual studio, when started in debug mode.This is only a beta!Use at your own risk. Note that connecting your computer to the RS485 bus coulddamage the vallox device. Power down the device before connecting/disconnecting the bus.Tested with vallox digit se.
Simple Serial Port Monitor
I am currently facing following problem: there is a system, which consist of one master device and some number of slave devices (all those devices have tiny MCUs). They communicate with some custom protocol based on serial wire (looks pretty similar to Modbus).All slave devices must have unique IDs within one bus, so master device can address each of those slaves. Currently I am forced to hardcode those IDs into each slave device. My goal is to flash all those devices with same firmware, so no hardcoded IDs should be used for this to be possible. I am thinking of master device, which is able to assign unique adresses to all those devices, but cant figure out, how to do that. Can anyone give me some idea or concept how to extend my communication protocol for this to be possible? Maybe someone can give me an example?
$begingroup$ Do your MCUs handle the ModBus-ish protocol in software? If they do, then on power-up you could not use ModBus until through an enumeration phase of its own protocol. Slaves need unique ID so put a DS2401 48-bit serial number IC on each. Then you implement a simple protocol with open-drain slaves using read fall-away (over 48 serial reads, slaves pass back a 0 as low, 1 as hi-Z, then check the read line and sit this round out if different to what they sent). Keep reading 48-bit numbers from the bus and assigning addresses until all done. I can expand this but first will your hw/sw allow it? $endgroup$–Apr 10 '17 at 16:14.
Free arizona drivers license checks. If, instead of a true buss, you had a daisy-chain arrangement, then you could have the master talk to the slave, assign an address, and then send it a command to enable the outbound port to the next slave. Repeat until all slaves have addresses.
This is basically how USB enumeration works with stacked hubs.Also, what kind of hardware arrangement are you using? Are the slaves board that are plugged into a backplane? If so, you could add extra pins on the connector with different arrangements of pins grounded on each slot to act as an identification, read by GPIOs on the slave, to generate the slave's address. I designed a system for this a number of years back.It worked like the schematic below. A common communication ring was established.Each slave has a logic switch circuit that initially, or on system reset, blocks the ring.– Schematic created usingOn start-up the master device, at the top, sends out a 'WhoIsThere' command.Command Structure CODE(ID1,ID1)ENDBecause the switches are initially open, only the first slave received that command.The slave copies the command packet and adds the ID of it's function type to the list and then sends the command on. The slave remembers the index of the location it added it's type id as it's ring address. Once sent, the slave closes it's ring switch.
Pci Bus
Simple Serial Bus Download
It then ignores any further 'WhoIsThere' command till the next reset.The next slave in sequence does the same thing. And on down the chain.Eventually the master receives the command back with a list of device types in the order they were found on the ring so knows the ID of each slave.After that the master just addresses packets to the appropriate slave. Since all the switches are closed at that point. They all hear the command, but only the one addressed responds.Further: In my particular application the system was back-plane based, where boards may or may not be populated for a particular product configuration. As such the switching elements were designed into the backplane so the slot was bypassed if the device was not populated.An alternative is actually to pass every command through each micro, however that introduces significant latency and a bit of overhead to each micro.