multiple serial triggers fire at same time, what will happen
Hannalee
Posts: 56
Does anyone really know what will happen when multiple serial triggers happen at the same time? Does the blu-80 buffer the serial outputs? Will it try to write them all at once?
0
This discussion has been closed.
Comments
Therefore, the answers to your questions are, \"no\", \"no\", and \"no\".
Dan
I have built a few systems now which feature multiple serial triggers.
I always build in some logic which doesn't allow the serial triggers to fire at the same time.
On the one ocassion where many did fire at the same time (my first test using multiple serial triggers) the unit I was controlling (Kramer 8x8 vid matrix) failed to process all of the commands, it was very unrelaiable.
I didn't spend a huge amount of time fault finding, it could have been that the Kramer couldn't process the incomming data quickly enough.
In my opinion, it's best to not allow all triggers to fire at the same time.
Martin
Dan
I have 14 controls on the blu-80 which output serial strings to a microcontroller which I designed. The controller translates baud rates ( the blu-80 will only send out at 1 buad rate, and doesn't do 1200 baud) as well as generates many non standard outputs to various remote control devices (which inturn controls hvac, lights, tvs, cableboxes, dmx, etc)
I guess the question is, if I have a preset which changes the states of the 14 controls which will then send out 14 serial strings, will the serial controller on the blu-80 buffer them and send them out as fast as it can, or will it not buffer them and send out the first one it gets and then send out the next one it sees after sending out the first string.
However, that doesn't guarantee that your microcontroller will be able to deal with those commands as quickly as the BLU devices transmits them.
My advice is to build in your own buffers for the serial trigger objects.
There are many ways to do this, one that's very inefficient but easy to explain is to set up a Pulse object in to a Counter Shifter with 14 output states. Then AND the Counter Shifter outputs with the logic states going in to the Serial Triggers.
That way only one serial trigger can be operated at a time. You also have control over the time between each message (to the nearest 100ms).
The downsides are that the logic can grow large quickly, it's running constantly (pulse object) and gives a minimum of 1.4 seconds to activate all serial triggers....
But hey, it's only an idea....
Martin
From the answer I getting, I assume that the blu-80 does NOT buffer the commands which are sent to the serial controller. Maybe I will redo my design and not have the actual controls on the users control panel, but will have presets. These presets ( which will only be 1 line instead of the 7 which represent the value of each controller ) will be easier to delay.
It is always fun trying to get hardware to do things it was never really intended for
First, of course the BLU-80 doesn't buffer the data. We're not talking about an Atari 2600 here trying to bit-bang a port. Ever since Fred Flintstone got out of the computer business, UARTs have been used to control the flow of data through serial ports precisely so that the system CPU doesn't have to screw around with it. The system CPU shoots data out to the UART at whatever rate is convenient and the UART sends it out the serial port at the correct rate for the current baud setting. Is it possible to overrun the input buffer on the UART? Of course it is, but who cares? We're talking about itty bitty serial strings here.
Build a simple test file that fires multiple serial triggers and monitor the serial output of the BLU-80. When testing in chunks of 80 hex pairs, the UART on the BLU-80 can handle approximately:
4080 hex pairs at 2400 baud
4080 hex pairs at 4800 baud
4080 hex pairs at 9600 baud
4080 hex pairs at 19200 baud
4160 hex pairs at 38400 baud
4240 hex pairs at 57600 baud
at 115200 baud it sends out so many pairs that I got bored when the BLU-80 logic section was at 200% and still hadn't maxed out the UART's capacity.
In other words, it's ridiculous. Over four THOUSAND pairs at 2400 baud. That means that if every string requires 80 hex pairs, you can pop 51 serial triggers with the same logic event without losing any data. Even cheap consumer plasma displays don't have protocols that suck that bad. If you only need 40 hex pairs for each serial string, that means you can do 102 of them without overrunning the UART. The only way to lose data is if the receiving device isn't able to handle 2400 baud. Is there really some device out there that can't handle 2400 baud?
You're putting a lot of effort into something pointless.
Dan
Signvideo cn-88 YPbPr router with audio...ONLY supports 1200 8bit,1bit stop no parity. Which is like the ONLY thing the blu-80 won't. Hence, it's off to lets program a microcontroller world....
Dan