??? 03/19/09 19:25 Modified: 03/19/09 19:26 Read: times |
#163659 - 8051 DMX controller (sender) |
Hello, I'm trying to create a simple DMX controller (sender), As I dont know very much about DMX I used Kathy Quinlan's DMX receiver as base to my DMX Sender, looks simple, and also I tested this sender with Kathy's receiver and works well, but I'm not shure if it will work with another receivers (fixtures, moving lights). I was trying to learn more about DMX and looks like the break need to be bigger than 88 microseconds, and this codes dont appears to make this. As I dont have how to test the project with real DMX receivers so often I asking for help.
This can work with normal DMX receivers? How can I make a break > 88 microseconds? Thanks. $mod51 ;ASM DIRECTIVE FOR USE 8051 COMMAND SET ;************************* DATA EQU AND DEF STATEMENTS ************************ CNT1 EQU 7FH ;WE HAVE A BREAK PULSE IADDRESS EQU 7DH ;BASE ADDRESS OF UNIT ;************************** START OF MAIN PROGRAMM ***************************** ORG 002BH ;START OF MAIN ROUTINE START: SJMP SETUP ;SETUP CPU FOR SERIAL,ONLY AT START-UP RUN: CLR TB8 MOV SBUF,#0 ;BREAK JNB TI,$ CLR TI SETB TB8 MOV SBUF,#0 ;SC JNB TI,$ CLR TI MOV CNT1,#100 ;Sends some bytes BYTESLOOP: SETB TB8 MOV SBUF,#0 JNB TI,$ CLR TI DJNZ CNT1, BYTESLOOP SJMP RUN ;************************** SETUP ROUTINE ************************************ SETUP: MOV R0,#7FH ;THIS + NEXT 3 LINES CLEAR ALL DATA CLR A ;LOCATIONS CLEAR_LOOP: MOV @R0,A DJNZ R0,CLEAR_LOOP MOV CNT1,#00H ;RESET DMX STATUS REG MOV PCON,#00H ;SETS BAUD RATE TO 250Kb (16 Mhz XTAL) MOV SCON,#98H ;SETS UP THE SERIAL PORT (MODE 2) MOV IADDRESS,P0 ;LOADS UNIT BASE ADDRESS FROM DIPS ;MOV IE,#90H ;ENABLE RECIEVE INTERUPT SJMP RUN ;RETURN TO MAIN PROGRAM END ;ASM DIRECTIVE FOR END OF FILE |
Topic | Author | Date |
8051 DMX controller (sender) | 01/01/70 00:00 | |
Forgot to say... project is using 16mhz crystal | 01/01/70 00:00 | |
Please enlighten us what you mean by "break" | 01/01/70 00:00 | |
Seems similar to break on RS232 cable | 01/01/70 00:00 | |
Ok, then... | 01/01/70 00:00 | |
I think it is just.... | 01/01/70 00:00 | |
Switch to another serial port mode,... | 01/01/70 00:00 | |
If Timer 1 is free, use this one. | 01/01/70 00:00 | |
More about break | 01/01/70 00:00 | |
Could be possible... | 01/01/70 00:00 | |
sending DMX512 | 01/01/70 00:00 | |
Works for Kathy's / Disable uart | 01/01/70 00:00 | |
Should work... | 01/01/70 00:00 | |
break | 01/01/70 00:00 |