I'm interested in using rs-485 on a pic michrocontroller in order to generate a DMX signal, only problem is I'm not sure how to impliment it, can I use uart on a pic to generate rs485?
some information on dmx
The basic DMX-512 signal is a 250kbps serial signal, eight bits data, one start bit, two stop bits, and a frame start break traveling on the RS-485 standard. A frame contains 513 bytes, the first byte was intended to contain a device number, which was never defined as anything but 0, the remaining 512 are the values each device is supposed to receive. Device 0 will only use the second byte of each frame, device 13 will use the 15TH byte of the frame, etc. So a typical frame will contain a logic low for 88uS or greater (Frame break/start) then a logic high for greater than 7uS (two stop bits), then a logic low start bit of 4uS, eight bits of data, each 4uS, LSB first, then logic high for greater than 7uS. This enables each light to be updated some 40+ times each second. Each device is supposed to hold their last setting for up to 1 second if the signal stops. There is no checksum or error correction of any kind. You may note that for lighting this is ok, if a light has been getting 0 for the last few seconds, and suddenly gets a 128 due to noise, it doesn't have time to change brightness noticeably before the next value comes. Therefore it is to be used only for non-critical systems (i.e., no flash pots, props or other dangerous equipment). There is only one signal source, though there are devices available which will take two sources and transmit one signal containing the higher value of each source per channel.
some information on dmx
The basic DMX-512 signal is a 250kbps serial signal, eight bits data, one start bit, two stop bits, and a frame start break traveling on the RS-485 standard. A frame contains 513 bytes, the first byte was intended to contain a device number, which was never defined as anything but 0, the remaining 512 are the values each device is supposed to receive. Device 0 will only use the second byte of each frame, device 13 will use the 15TH byte of the frame, etc. So a typical frame will contain a logic low for 88uS or greater (Frame break/start) then a logic high for greater than 7uS (two stop bits), then a logic low start bit of 4uS, eight bits of data, each 4uS, LSB first, then logic high for greater than 7uS. This enables each light to be updated some 40+ times each second. Each device is supposed to hold their last setting for up to 1 second if the signal stops. There is no checksum or error correction of any kind. You may note that for lighting this is ok, if a light has been getting 0 for the last few seconds, and suddenly gets a 128 due to noise, it doesn't have time to change brightness noticeably before the next value comes. Therefore it is to be used only for non-critical systems (i.e., no flash pots, props or other dangerous equipment). There is only one signal source, though there are devices available which will take two sources and transmit one signal containing the higher value of each source per channel.