2004-04-26 02:11 AM
2004-04-21 08:37 PM
Hi
I wrote software for an ST7LITE29 that converts DMX to 3 PWM outputs. DMX is a asyncronous protocol at 250kHz and 9 bits per frame. Since st7lite29 has got no uart, i wrote a software uast myself. It worked fine for a long time. Now a protoserie is made, the software fails sometimes (small diffrence in resonator frequency...) I'd like to change to an ST7 with an UART, so i can use the same software without the ''selfmade uart'' Any ideas2004-04-21 09:19 PM
I removed a 'nop' instruction and the thing works again!
Maybe the code was changed by accident??? But now i'm doubting, is this a good way to word, should it be better to use a controller with a real uart???2004-04-21 09:39 PM
DMX512 as you said is a serial protocol - simply RS485 at 250kbaud.
That s quite a speed to handle in software, I think a better micro would be the ST72F264 which has a hardware uart. Regards sjo2004-04-21 10:22 PM
There is an application note available on this site for yor application i.e. AN1753 ''Software UART using ST7 12-Bit Autoreload Timer''.
2004-04-21 10:49 PM
Thanks for your fast responses.
The AN1753 -uart works up to 19200 Baud and DMX = 250000 Baud. When i look at the datasheet of the ST72264G (i think this is the same as the ST72F264, you mentioned) i do not see an uart. In fact i do not find any st7 with an uart. Greets2004-04-21 11:49 PM
ST call it an SCI
Regards sjo2004-04-26 01:30 AM
Hi,
Thanks for your help! I have asked some samples of an ST7 with SCI. But still one thing isn't clear yet: To decode DMX the number of frames after the break should be counted. So this counter has te be resetted at each break. How can i know when a break occurs? A break is handled as a framing error and a FE generates no interrupt. So, is the only way polling all the time the FE-bit and checking the SCIDR for value 0? Thanks!2004-04-26 02:11 AM
A receive interrupt will be generated (RDRF), you can check for framing error in this interrupt. FE and RDRF bits will be set together.
Regards sjo