Hi Harold, Thanks for the response. I'm still unclear as to when is the time to check the error flags... before reading the byte from the data register (if there is one) or after. I've seen code that does it both ways, but the datasheet for the PIC suggests that you should read the error flags first. Can you clear this up for me? Thanks. Andrew > > I've done a fair amount of DMX transmission and reception using PICs > (mostly 16c74 and 18c452). I detect a break using the FE flag, then "eat > the byte" out of the usart data register, then go back to waiting for the > next incoming byte. After the FE, we assume the incoming byte will be the > start code byte (which should be zero). As each byte is brought in, FE is > checked. If an FE occurs, the state machine is reset to the point where > we are waiting for the start code byte. I don't check the contents of the > byte when there was an FE. I just throw it out. Seems to work (many > thousand units now out there). > > Harold > > > > FCC Rules Online at http://hallikainen.com/FccRules > Lighting control for theatre and television at http://www.dovesystems.com > > ________________________________________________________________ > GET INTERNET ACCESS FROM JUNO! > Juno offers FREE or PREMIUM Internet access for less! > Join Juno today! For your FREE software, visit: > http://dl.www.juno.com/get/web/. > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads