In SX Microcontrollers, SX/B Compiler and SX-Key Tool, lboucher wrote: Hi Guys I was hoping to ask those wiser than me to take a look at my code real quick. You may remember this code from back near Christmas. This is the firmware to my 17 channel SX christmas light controller. I built 6 units, and they are all connected together via a serial line. Computer-> Unit 1 -> Unit 2 etc... Anyways So i "borrowed" the interrupt based assembly level serial. I generally understand how it works, but not clear enough to really debug. The quick funtional overview. Each box receives serial data. The start of the serial data is always 126 (Sync Byte) followed by a byte i don't care about. Then 17 dimmer levels for that particular unit. Then more dimmer levels for units downstream. The Sync Byte, Byte I don't care about, and dimmer bytes after the first 17 received, all get repeated downstream. There were 2 issues i discovered once i fielded the system. 1. From the 3rd unit on the data was corrupt resulting in random flashing. (Workaround was to set computer to use 2 stop bits instead of 1.) 2. From the 2/nd or 3rd box down i would get random flashes when the dimmer value was really low, say 30 or below. (Workaround, don't send really low dimmer values.) So overall, it worked fine this past year. These 2 things just bug me, i spent a couple hours looking at the code and still don't get it. If i am reading the code right this should definitly work with only 1 stop bit. Any thoughts would be appreciated. Thanks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=449816 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2010 (http://www.dotNetBB.com)