View previous topic :: View next topic |
Author |
Message |
g-netix
Joined: 19 Aug 2012 Posts: 19
|
using UART error interrupt |
Posted: Sun Jul 21, 2013 11:27 am |
|
|
Hi all,
I'm building a DMX receiver. I use the UART @250kbaud and as DMX has a break >88us, I read that the error interrupt can detect this break (if I don't mistake the error appears twice for one break).
My question is how to use the error? I had it on the #use RS232 parameters but don't know how to use it to detect a anormal no-activity time.
Thank's! ;) |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Sun Jul 21, 2013 2:43 pm |
|
|
What PIC?. |
|
|
g-netix
Joined: 19 Aug 2012 Posts: 19
|
|
Posted: Mon Jul 22, 2013 11:41 am |
|
|
Excuse me I forgot to mention it, I work with a 18F46K22, but I think it'll be available for almost all 18F and perhaps 24F and dsPIC33.
While I don't have answer I'll ask another question at the same time :
When I use a baudrate of 250k with BRGH1OK, it seems that the RDA interrupts disable the send of data. If I disable RDA interrupt I can send data... As DMX512 is half-duplex it's not a problem for the transmitter because I don't need this interrupt, but I think it will also lock the receive data... and I won't be able to get my 512 bytes with the receiver... If I switch to 9600, 19200 or another standard rate and delete BRGH1OK it works fine...
Thank's! ;) |
|
|
g-netix
Joined: 19 Aug 2012 Posts: 19
|
|
Posted: Tue Jul 23, 2013 12:53 pm |
|
|
up! |
|
|
|