:-) thanks
i have made many projects with pic but dmx is not like "led open or close"
it is different
i wait answer only who knows about the dmx and who can help me to solve this problem and if you want i pay too
:-) thanks
i have made many projects with pic but dmx is not like "led open or close"
it is different
i wait answer only who knows about the dmx and who can help me to solve this problem and if you want i pay too
It's not a matter of money...but if that's the way you want to go...so be it...
Do you know what a good software developer charges for those services these days? It's not cheap for a good, reliable, bug-free product...
(quite frankly neither do I...I've been paid for services before, but nothing with a contract, just a 'gentleman's agreement)
Looks like this is one that gets fed the corn and never learns to farm...
Last edited by skimask; - 16th May 2007 at 15:18.
it is ok friends , thanks for everything
i decided to buy a small device for me
Last edited by alex-x; - 16th May 2007 at 20:03. Reason: x
@dynamoben
Can you explain to me this code for 1 chanel?
it was yours i have found it in the forum
DimmerCount VAR WORD ; Location in DMX string
DMXStartAddr VAR WORD ; DMX start address
DMXStartCode VAR BYTE ; DMX Start code (Dimmer=0)
Dummy VAR BYTE
DMX_State VAR BYTE ; Stage of DMX reception
Valid_Break CON 1
Valid_SC CON 2
Valid_Data CON 3
Disable
INTERRUPT_SUB:
IF OERR Then
CREN = 0
CREN = 1 ; Clear Overrun Errors
High Err_LED ; Notify user of overrun error
DMX_State=0
EndIF
IF FERR Then
FERR = 0
DMX_State=Valid_Break
Else
GoSub RX_DMX_Data
EndIF
Dummy=RCREG ; Empty UART of junk data
Resume
RX_DMX_Data:
IF DMX_State=Valid_Break Then
HSerin 20,NoData,[DMXStartCode] ; Start code of 0 = dimmer data
IF DMXStartCode=0 Then
DMX_State=Valid_SC
Else
High Err_LED ; Notify user of Error in Start Code
DMX_State=0
EndIF
EndIF
IF DMX_State=Valid_SC Then
For DimmerCount=0 TO DMXStartAddr; Count incoming data bytes (frames)
Dummy=RCREG ; Read unwanted values
Next DimmerCount
DMX_State=Valid_Data
EndIF
IF DMX_State=Valid_Data Then
HSerin 20,NoData,[STR DataBuffer\Number_Of_Channels]
DMX_State=0
EndIF
IF DMX_State=0 Then
Resume
EndIF
GoTo RX_DMX_Data
NoData:
DMX_State=0
Resume
Enable
End
That is the same code that you put in post #1.
As I explained before, that is only a code chunk, a small part of a much larger project. And quite frankly, if that code was the whole thing, it is fairly well commented and/or self-explanatory.
Do you know how DMX works? Do you know the basics of it's protocol?
Skimask is correct. If you have a complete understanding of the DMX protocol the code I posted should make sense. The Microchip application note mentioned above has a document that talks about how to receive DMX. Their explanation and what I'm doing in my code match.
You have to have a complete understanding of DMX before you can write/understand any of this code. Once you have that its pretty simple, a short cut would be to use Microchips example code in your project. (see ASM command)
Last edited by DynamoBen; - 17th May 2007 at 19:26.
Bookmarks