Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/19/03 18:57
Read: times


 
#50998 - RE: Multiprocessor communication with 8051
Responding to: ???'s previous message
Configure the uC UART for mode 3 (SCON=0F0h), interrupt driven.
First, set an "address" for each uC.

When interrupt happens verify if SM2 bit is set, then check the address and if it matches, then continue with the interrupt service, else get out of there.

Example:

.
;set baud rate
mov th1,#0fah
mov scon,#0f0h ;multiprocessor mode
setb tr1 ; start communications
.
.
.
.

;Interrupt service
;This only happens when you send a byte with the 9th
;bit set
SERIAL:
clr RI
mov a,sbuf ;get buffer
cjne a,#65,NODIR ;if uC address <> 65 the get out
clr SM2 ;disable 9th bit
;get more data if needed
loop:
jnb RI,loop
mov a,sbuf
clr RI
;do more things if you need
.
.
.
.
NODIR:
setb SM2 ;set initial state
reti


you can try this out using a PC. Use Hyperterminal os something similar.Configure your baud rate as same as your uC with MARK PARITY and send the address to the uC (In this case is an "A"). The uC will stop and will wait for more data.
Change parity in the PC to SPACE PARITY and send a byte, the uC will continue with its job.
If you have questions feel free to ask

List of 21 messages in thread
TopicAuthorDate
Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 80            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
   RE: Multiprocessor communication with 8051            01/01/70 00:00      
      RE: Leopoldo            01/01/70 00:00      
RE: Multiprocessor communication with 80            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiproc comm..if 10 pins free :)            01/01/70 00:00      
RE: Multiproc comm..if 10 pins free :)            01/01/70 00:00      
please tell me some about Computer Buses            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      
RE: Multiprocessor communication with 8051            01/01/70 00:00      

Back to Subject List