Searching \ for 'Data received LED' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/displays.htm?key=led
Search entire site for: 'Data received LED'.

Truncated match.
PICList Thread
'Data received LED'
1998\05\13@230130 by Kelly J Kohls

picon face
Hi Ed,
First, I am sorry it has taken me this long to respond.  When I managed
to get the first prototype operating correctly, I was simply turning on
the LED whenever the PIC entered the data received interrupt routine and
turning it back off when the interrupt routine finished.  This DID work,
however there was noticeable flicker in the LED.  What I wanted was for
the LED to be constantly on whenever data was being received.  My
solution (or so I thought) was to use one of the timers.  Every time the
data received interrupt routine was called, I would reset the timer 1
counter. This would prevent the timer 1 interrupt from being called.  If
the DMX data stream WAS interrupted, then the timer would "time-out" and
the timer interrupt routine would turn off the LED.  However, the LED
continues to flicker.  For some reason the timer interrupt is being
called, that is the part I haven't figured out.  I haven't given up
though, I am continuing to work on this problem and am trying to develop
a method of detecting the break that doesn't involved use of the 9th data
bit.  This would allow for the detection of real framing errors, although
I don't believe the DMX512 spec defines any error detecting/correcting
procedures, so this may be a moot point.  By all means, go ahead and try
this method.  I am here to learn as well, so if you discover anything
new, please post it on the list.  After reading your message, I went back
and looked at my code and realized that I hadn't finished commenting the
interrupt handler.  As soon as time permits, I will correct this and post
a new file.  I will be sure and send another message to the list when I
get this done.

All for now,

--------------------------------------------------------
Kelly Kohls
Amateur Radio Callsign : N5TLE
Home E-Mail Address: spam_OUTkkohlsTakeThisOuTspamjuno.com
Homepage URL: http://www.qsl.net/n5tle
--------------------------------------------------------

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\05\14@120242 by Harold Hallikainen

picon face
       In my routine for receiving DMX, I set the serial port (in a
16c74A) for 8 bits.  I watch the FE bit to determine when there is a
break.  A code fragment that does this is...


RxState2a                       ; We have a byte!
       btfss   rcsta,ferr              ; Check for FE
       goto    RxState2b       ; No FE, get data byte
       movf    rcreg,0         ; get rx byte in w, throwing
it away
       decf    RxState,1               ; Go back to state 1,
waiting for start code
               return                  ; Leave RxState at 1 and
exit to ISR


       Similar to your idea, I've used a timer to detect loss of DMX.
However I use an interrupt driven (in this case, 50/60 Hz line zero
cross) RAM counter.  Here's a code fragment showing clearing of the
timer...


RxState2d                       ; We are getting a value we want, not
the last one
       clrf    dmxLossTimer    ; On each byte, reset timer that
turns LED red
       ledgreen                        ; and turn it green
       movlw   RxByte0         ; Get address of byte 0
       addwf   RxByteCountLo,0 ; Add in byte count, which
now corresponds to dimmer number
       movwf   fsr             ; Point to RxByte array
       movf    rcreg,0         ; Get the data byte
       movwf   indf            ; store data in RxByte array
       goto    IncRxByteCount  ; Increment count and return


       The dmxLossTimer is, in this product, actually decremented in the
ISR that is called on detection of a negative line zero-cross.


 cblock
       dmxLossTimer
 endc
       decfsz  dmxLossTimer,1
       goto    ZeroCross       ; go do phase control stuff
       ledRed                  ; timed out, make led red if timed
out


       Note that ledRed and ledGreen are macros so I don't have to
remember which bit does what...



       Good luck with your project!


Harold

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\05\14@234045 by Kelly J Kohls

picon face
Hi Harold,
Thanks for the tips.  As soon as I get some time I will see if they will
provide me with a solution.

All for now,

Kelly Kohls
Amateur Radio Callsign: N5TLE
Home E-Mail Address: .....kkohlsKILLspamspam@spam@juno.com or n5tlespamKILLspamqsl.net
Homepage URL: http://www.qsl.net/n5tle

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...