#include "REG932.H" #include unsigned int ucx=0; unsigned DMX_adresse = 3; void Int_Ser(void) interrupt 4 using 0 { if(RI) { RI=0; //P2=SBUF; ucx++; } } main() { P1M1 = 0x00; P1M2 = 0x00; P2M1 = 0x00; P2M2 = 0x00; P1 = 0xFF; P2=0x00; SCON =0x50; PCON|=0x40; BRGR1=0x00; BRGR0=0x20; BRGCON|=0x03; ES=1; EA=1; while(1) { if (FE==1) { //ucx++; FE=0; } if (ucx==DMX_adresse) { P2=SBUF; ucx=0; } } }