Search the archives - more than a year ago I posted working snippets of code for receiving DMX using PBP. No assembly needed.
I've sucessfully used a 16F628 and a 16F88 at 20 and 16 MHz respectively. Transmitting and receiving data are equally easy and can be done in the background (using interrupts) if you're careful.
On a '628 at least, you can receive with a 4 MHz clock, but you won't have much time to process the data you've acquired.
As others have mentioned, there's more to the DMX signal than just the serial data. Make sure you understand how the break signal works and what duration it can be. An oscilloscope will make your journey much, much easier. Some of signal timing is pretty specific. Spent the $40 and buy a copy of the USITT standard. It's a great reference.
You need to become one with the USART chapter of your datasheet. You'll find charts which describe exactly which clock frequencies you need for stable reception.
Start by toggling an LED or flipping a pin when your code succesfully identifies the 'break' signal.
Then flip a pin when you've received and correctly interpreted the 'start' code.
Then grab data from the first channel and display it on an LCD or serial terminal. Make sure its value follows your console's fader position, etc.
Then try grabbing channel 10 or 96 or something arbitrary.
JEC





Bookmarks