USART was never designed to be a network interface
Not talking micro to PC
Who cares what it was designed for? The question is, will it work.
This is many micro's connected.
To get a USART to work is a complicated high overhead software mess
I'm not necessarily familiar with the proposed usecase here, but to describe having an extra little header that represents the meaning "only micro #5 respond to this" as "a complicated high overhead software mess" seems... a bit over the top.
The "a bit over the top." is trying to use one tiny simple part of the whole thing as proof of over the top.
ilium007
Been a long time since I even looked at cbus.
From that is also some other things you need to pick out.
Think you could add keep it simple.
Keep it simple to add to.
CAN is a good foundation to build on for what you want to do.
If you work with CAN to get job done.
If you have been programming for a while, you will need to keep an eye on your self that you are not making it more complicated then it should be.
" event producer / event consumer "
For your train model most of the time will be be a "Value changed event"
Plan ahead some
An Extended frame format needs few changes to allow both.
Your software should check the CAN packet input.
If you start with idea that every CAN packet it bad then you only need to add test for this is correct.
For example
start with packet marked bad
When you receive an Extended frame format packet.
Base frame format check leaves it bad
Extended frame format check makes it good
Receiving a base frame format packet
Base frame format check leaves it good
Extended frame format check makes it bad
After all tests process the good
By ordering the tests
base is good and this part of base is good
In the process tests are identifying what type of packet.
Extended frame format with some bad bit values remains bad.
Keep in mind
You are not wasting time scanning input with what is on CAN bus. You have all that done before it gets to CAN
With only changes, something could die and you not know it.
Think this is handled by the
"Remote transmission request (RTR) " bit
Where a consumer has not heard of a change in a long time.
That one bit change would let one non producer request a resend of last value from the producer.