Baud Setup: 38,400,N,8,1 (standard N,8,1 (no parity, 8 bits, 1 stop bit)
Definitions:
Select Bits: A data byte consists of 8 bits. Bits 0 thru bit 7. The bits that are set high are used to set outputs/drives to be controlled by the command. Range is 1 to 7 (see 'Setting Select Bits' (below)
Brightness: Range 0-255 set the brightness (PWM) of the drives.
Fade: Range 0-255 (Fade sets the rate of change from one brightness level to the next in milliseconds. So if changing from 0 brightness to 255 brightness and fade = 10, then it takes 2,550 milliseconds to change from 0 to 255 brightness. Changing from Brightness of 128 to 255 takes 1,255 milliseconds and so on. Fade = 0 is instant change to the Brightness.
204: (This is the verify byte for the command so that if strings are sent instead of bytes the strings will be rejected because 204 is out of range for ascii bytes)
The most typicl commands are CMD1 thru CMD9 which are used to control the RGB Drives: These are 5 byte commands (CMD#, select bits, brightness, fade, 204)
Note: All commands are listed and do not apply to all boards. I.E. if a board does not have an I/O terminal block, then CMD1 will be ignored. If a board only has 1 set or RBG drives, then commands for other drives will be ignored
Note: It is highly recommended that you use your computer to get familiar with the commands. This will save lots of development time if you don't have to deal with the BrightSign programming and booting!
Output Commands (CMD1 thru CMD 8:
[CMD#, Select Bits, Brightness, Fade, 204] (5 bytes). Sets Drives (PWM Outputs RBG) by Bit Selection.
CMD1 [01], select bits, Brightness, Fade, 204 (5 bytes), Sets drives of TB2 (terminal block 2)
CMD2 [02, select bits, Brightness, Fade, 204] (5 bytes), Sets Drives of TB3
CMD3 [03, select bits, Brightness, Fade, 204] (5 bytes) Sets Drives of TB4.
CMD4 [04, select bits, Brightness, Fade, 204] (5 bytes) Sets Drives of TB5
CMD5 thru 8 for future development for boards with up to 8 sets of RGB drivers
Example: 01, 01, 255, 0, 204 (this is the serial send bytes, comma separated BrightAuthor function). This is CMD1, select bites = 1 (first drive of the Terminal Block), Brightness = 255 (maximu), fade = 0 (instand, verify byte)
Example 1, 7, 255, 20, 204 (CMd1, 07 = sets all 3 drives of TB2, 255 = max brightness, 20 = fade rate 20 (milliseconds per step of change, 204 (verify byte)
Setting 'Select Bits' Usage:
1 = setting drive 1
2 = setting drive 2
3 = setting drive 1 & drive 2
4 = setting drive 3
5 = setting drive 3 & drive 1
6 = setting drive 3 & drive 2
7 = setting drives 1, 2, and 3 of of the RGB sets
CMD9 (GLOBAL: SET ALL Available DRIVE Sets) [9,SELECT BITS,BRIGHTNESS,FADE,204] I.E. If drive 1 bit selection, then each 'drive 1' of each set of drives is controlled by this command. This is intended for boards with multiple RGB drives. Very useful if the drives are all connected to the same colors and this one command will set all available 'drive sets' by bit selection.
CMD10 (set TB10 outputs) [10, select bits , on/off state, 204] (4 bytes). If the 'TB1' I/O's are programmed as outputs, then this command sets TB1 outputs on/off by bit selection.
About Scenes:
Each scene is mapped to a 256 byte 'page' of non-volatile-memory. The scene can just control outputs (PWM Drives or Outputs) or the scene can 'gosub' or 'goto' another scene. Scenes can overlap a page. The pointer used during scenes will just advance to the next page if zeroes are retrieved when 'looking' for the next command. The number of scenes is dependent on the processor used. If you need more scenes than the 'standard' number of scenes for a particular microprocessor, contact HMS Electronics for 'custom options'. During 'Play' all commands are expected to do with outputs or PWM drives.
Scene Structure (Playing a Scene): Note: 'skip pause' if Minutes = 254.
CMD (1 to 9): [CMD#, Select Bits, Brightness, Fade, Minutes,
Seconds, 10 Milliseconds] (7 bytes) or 5 bytes if skip pause.
Note the Brackets are not part of the send bytes command from BrightAuthor!
CMD10: (setting I/O's) = [10,select bits, on/off, Minutes, Seconds, 10 Milliseconds] (6 bytes). or 4 bytes if skip pause.
Scene Commands:
Play Scene: [32, scene#, repeats, 204] Note: This command can be sent from either a computer or the BrightSign
Erase Scene: [xxx,204]
Say Scene: xxx,204
Record Scene: xxx,204
Cancel Play xxx.204
During Play Cmds 1-9 are only valid. The Command structure during play is CMD#,Select Bits, Brightness, Fade, minutes, seconds, 10 milliseconds. Note: If minutes =
Tokens (special bytes) that are used in scenes
Gosub Scene = [253, number of repeats]
Goto Scene = 251, number of repeats
End Scene = 252 (if repeats was > 0, then the scene is repeated. When repeats are done, then the scene that did the 'Gosub' is
End Play = 254 (exits without repeats)
Scene Play Structure:
Scenes can be commanded from the 'Play Scene' command (computer of BrightSign) or Played from the Input terminal block (TB1 mode = 2 or 3)
The 'Play Scene Command issued from BrightAuthor or computer is: CMD xx, scene#, repeats.204
Manual Play (Scenes commanded from the input terminal block (TB1 mode = 2 or 3)
Input 1 plays scene 24 (does GOTO scene1, repeats = 0)
Input 2 plays scene 25 (does 'GOTO scene 2, repeats = 0)
Input 3 plays scene 26 (does 'GOTO scene 3, repeats = 0)
Input 4 plays scene 27 (does 'GOTO scene 4, repeats = 255) ;Note: 255 is forever repeats!
If these inputs are available (see the RGB board data sheet)
Input 5 plays scene 28 (does 'Goto scene 5, repeats = 0)
Input 6 plays scene 29 (does 'goto scene 6, repeats = 0)
Scene Commands (issued from the BrightSign or computer)
CMD 32, Play Scene: [32,scene#,repeats,204]
CMD 33, Record Scene: [33,scene#,204] (used by the ''Scene Programmer"
CMD 34 Cancel Play: [34,204] this command can be sent anytimer during command play or manual play
CMD 35 Erase Scene: [35,scene#,204] Note: This command is sent by the scene programmer when when 'download' is selected.
CMD 44 Say Scene
Miscellaneous Commands:
CMD 30, Set TB1 Mode [30,mode number,204]
00 = Output Mode,
01 = Input (Report change of the inputs to the BrightSign), 02 = Manual Play
(button closure has to be maintained), 03 = Manual Play (button closure can be
momentary.
Note: The default for TB1 mode = 1 (easily change using a
computer)
CMD 45, Say Version (45,204): (used to output the version bytes to a computer)
Link: Scene Programmer.zip (Runs on Windows machines and provides a 256 byte 'page' for programming scenes in decimal bytes.
Author: Richard Harkey
Revised: August 27, 2024