 | Elektrotekno.com Elektronik ve Teknoloji Merkezi
| | Yazar | Mesaj | programmer | | Tarih: 11.02.2007, 03:12 Mesaj konusu: Dmx 512 Adresleme - yardım | |
| arkadaslar tek kanaldan dmx512 sinyalini adres ve deger oalrak alan receiver kodu sorunsuz calısıyor test edildi..
-------------------------------------------------------------------------------------------------------------------------------------------
;************************* 1channel ***************************
;************************* dmx 512 recıver program ***************************
;************************* 11 bıt output ***************************
;************************* by kathy quınlan ***************************
;************************* k.a.q. electronıcs ***************************
;************************* wrıtten 05-09-1997 ***************************
;************************* last modıfıed 26-01-2001 ***************************
;************************* copyrıght 2001 ***************************
;
;message from the creator about lıfe.......
;
;... at least my programmıng ıs not as bad as my spellıng. sorry about the
; comment fıelds.
;
;
;
;
$mod51 ;asm dırectıve for use 8051 command set
;************************* data equ and def statements ************************
cnt1 equ 7fh ;we have a break pulse
temp equ 7eh ;throw rubbısh here
ıaddress equ 7dh ;base address of unıt
temp2 equ 7ch ;
cur_byte equ 7bh ;current byte #
tıme2 equ 7ah
dmx1 equ 79h ;dmx byte 1
;************************** ınterrupt vector lıst ******************************
org 0000h ;reset vector
sjmp start
org 0003h ;external ınterrupt zero
retı
org 000bh ;tımer zero overflow
retı
org 0013h ;external ınterrupt one
retı
org 001bh ;tımer one overflow
retı
org 0023h ;combıned tx and rx ınterrupt
sjmp rec_byte
;************************** start of maın programm *****************************
org 002bh ;start of maın routıne
start:
sjmp setup ;setup cpu for serıal,only at start-up
run: sjmp run ;waıt for byte requıred
;************************** setup routıne ************************************
setup:
mov r0,#7fh ;thıs + next 3 lınes clear all data
clr a ;locatıons
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 serıal port (mode 2)
mov ıaddress,p0 ;loads unıt base address from dıp's
mov ıe,#90h ;enable recıeve ınterupt
sjmp run ;return to maın program
;************************** recıve dmx bytes *********************************
rec_byte:
push psw ;pushed to stop over wrıte
push acc ;pushed to stop over wrıte
clr rı ;clear the recıve flag
jb rb8,rec
mov cur_byte,#00h ;we have a break
sjmp outı
rec: mov a,cur_byte
cjne a,#00h,recd ;ıf current dmx byte greater than 0 we have detected start byte
mov a,sbuf ;moves current dmx byte to acc
cjne a,#00h,outı ;check ıf byte zero
ınc cur_byte ;we have byte zero !!!!!!!
sjmp outı
recd: mov a,cur_byte ;mov current dmx byte to a
cjne a,ıaddress,not_a ;comp unıt adress and current
acall output ;go to save byte routıne
not_a: ınc cur_byte ;ınc readey for next dmx byte
outı: pop acc ;returned from stack
pop psw ;returned from stack
retı ;proc go home !!!!
;************************** output byte *************************************
output: mov p2,sbuf
ret ;jd
;************************** the end ******************************************
end ;asm dırectıve for end of fıle
|
|
|
|
sagamen | | Tarih: 12.02.2007, 22:07 Mesaj konusu: | |
| merhaba
belki bu siteler size yardımcı olur
http://www.whoow.org/people/Jean-Marc.L...ex_en.html
http://dworkin-dmx.de/
http://www.freewebs.com/freedmx/HOW!.htm
|
|
fuzzy | | Tarih: 14.02.2007, 12:16 Mesaj konusu: | |
| Ben bir aralar teorisi ile ilgilenmiştim.USITT in bir standartıdır.USITT bu standart evrağını para ile satıyor.Nette ararsanız bulacaksınız.Bu evrağı bulmaya çalışın gerçek anlatım o standart evrağında var.
Alta size bu standartla ilgili özet yazı buldum inceleyin
http://www.bnoack.com/index.html?http&a...MX512.html
|
|
|
|