The information that must be written to the Connection Memory Low byte to indicate the source of the information output in STo7 Channel 1 is ‘00011111’. The three most significant bits of this byte are selecting the input stream and the five least significant bits are accessing the input channel on that stream.
To access Connection Memory High for the same output channel, CRb4 and CRb3 must be set to ‘11’ and CRb7 must be ‘0’. CRb2, CRb1 and CRb0 need not be changed, and the same setting of A4-A0 must be used. CMHb0 must be set to a ‘1’ to ensure that the output channel is not in a high impedance state and CMHb2 must be ‘0’ so the channel is in Switching mode. For the same reason, CRb6 must be a ‘0’.
The last example involves writing information from the microprocessor port to output Channel 16 on STo4. The associated bytes for this channel in the Connection Memories may be accessed in the manner described in the last example. The only difference in the procedure is the setting of CRb2, CRb1 and CRb0 (‘100’), and the setting of A4-A0 (‘10000’). If CRb6 is set to a ‘1’ (overall Message mode) then the contents of the Connection Memory high are unimportant. If CRb6 is a logical ‘0’, CMHb2 must be set to a ‘1’ to specify Message mode, and CMHb0 must be set to enable the output drivers for STo4 Channel 16. Information desired in the channel must be written to the associated Connection Memory Low byte.
Example of Write cycle of simplex communication on mt8981
clr DAS
mov address,reg_add
mov sdata,regcon_high_data_source ;data to be written on high mem
clr CS
setb DAS
pre:
jnb DTA,done
jmp pre
done:
clr DAS
setb CS
;writing data on high mem
clr DAS
mov address,channel
mov sdata,high_mem_conn ;to make in connection mode
clr CS
setb DAS
pre1:
jnb DTA,done1
jmp pre1
done1:
clr DAS
setb CS
;writing on register to select low memory
clr DAS
mov address,reg_add
No comments:
Post a Comment