> On 2/24/06, G=F6khan SEVER wrote: >> after working a bit with those little ligthy things, i'm planning to >> implement lighting control system based on dmx512 >> protocol. Because of i'm newbie to this subject i need some introductory >> opinions about how the system work generally. >> After grasping general working of the controll system i will strive on >> techinal details such as how the dmx512 protocol >> works?, how can the each unit adressed, what must be the proper >> hardware-software design for this system and of course a >> windows based controller gui considerations... > > Check out http://www.dmx512-online.com. It's a good technical overview > for non technical people. As always, nothing beats owning the actual > spec (I do). It's about $30 from ESTA. > > Josh And the basic DMX512 protocol is pretty straightforward. It's EIA485, send a break, send a mark after break, send a start byte (zero for control of dimmers), send a byte for dimmer 1, send a byte for dimmer 2, repeat as necessary. You generally have to send at least 24 dimmer values, up to a maximum of 512. Data is 8 data bits, no parity, two stop bits at 250kbps. The tricky part on a pic is synchronizing the break with the data (the break command in some newer pics is not long enough, I do generate the break using another PIC pin). To get around the synchronization problem, I use a timer interrupt instead of a uart interrupt. Then, when I put a byte in the uart transmit register, I know that byte starts transmission right now. Otherwise, you have to try to figure out how long it'll be in the holding register, then the shift register, etc. Using a timer interrupt makes it pretty simple. From there out, it's a state machine. Good luck! Harold -- = FCC Rules Updated Daily at http://www.hallikainen.com -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist