??? 03/07/07 08:22 Read: times |
#134445 - is AT89C51 can support Auto Address Rec: feature ? |
Hello to all well i am trying to design a system as discribed earlier that in that system there are many slaves, and a Master, so according to my previous post i have concluded that i cannot control the Slaves through PC's RS232 port so i am going to use an another 8051, (AT89C51 or AT89C2051) but i have found that in the DataSheet of the 8051 from Atmel the havent shown that their 8051 based MCU's had two Registers which are essential for Automatic Address Recoganization, that are SADDR and SADDEN , so could any one tell me that how to confirm that these MCUs have "Automatic Address Recoganization" feature,
well i have wrote the program for Slave in Assembly that is just same as the Intel's one but with slight chnging.. ORG 0000H LJMP ON_RESET ORG 0023H LJMP SERIAL ORG 0030H ON_RESET: MOV SCON, #0F0H ORL PCON, #40H MOV TH1,#0F3H MOV TL1,#000H MOV TCON, #34H INTERRUPTS: SETB EA ; Enable global interrupt SETB ES ; Enable serial port interrupt ADDRESSES: MOV SADDR, # 11110001 ; Define Given & Broadcast MOV SADEN, # 11111010 ; Addresses ; GIVEN 4 11110X0X ; BROADCAST 4 11111X11 SJMP $ SERIAL: PUSH PSW CLR RI ; RI set when address is ; recognized & must be cleared ; in software CLR SM2 ; Reconfigure slave to receive ; data bytes RECEIVE_DATA: JNB RI, $ ; Wait for RI to be set MOV A, SBUF ; Receive data byte & store ; in temporary location CLR RI ; Clear flag for next ; reception SETB SM2 ; Re-enable Automatic ; Addressing POP PSW RETI END |