MC68HC05L28B MOTOROLA [Motorola, Inc], MC68HC05L28B Datasheet - Page 92

no-image

MC68HC05L28B

Manufacturer Part Number
MC68HC05L28B
Description
Flexible general-purpose microcomputer
Manufacturer
MOTOROLA [Motorola, Inc]
Datasheet
8
8.5.4
A data transfer ends with a STOP signal generated by the master device. A master transmitter can
simply generate a STOP signal after all the data has been transmitted; for example:
MASTX
END
EMASTX
If a master receiver wants to terminate a data transfer, it must inform the slave transmitter by not
acknowledging the last byte of data. This can be done by setting the transmit acknowledge bit
(TXAK) before reading the second last byte of data. Before reading the last byte of data, a STOP
signal must be generated first. The following is an example showing how a STOP signal is
generated by a master receiver.
MASR
LAMAR
ENMASR
NXMAR
8.5.5
At the end of the data transfer, if the master still wants to communicate on the bus, it can generate
another START signal, followed by another slave address, without first generating a STOP signal.
For example:
MOTOROLA
8-12
Generation of a STOP signal
Generation of a repeated START signal
BRSET
LDAA
BEQ
LDAA
STAA
DEC
BRA
BCLR
RTI
DEC
BEQ
LDA
DECA
BNE
BSET
BRA
BCLR
LDA
STA
RTI
0,MSR,END
TXCNT
END
DATABUF
MDR
TXCNT
EMASTX
5,MCR
RXCNT
ENMASR
RXCNT
NXMAR
3,MCR
NXMAR
5,MCR
MDR
RXBUF
I
2
C-BUS
;IF NO ACKNOWLEDGEMENT,
;BRANCH TO END
;GET VALUE FROM THE
;TRANSMITTING COUNTER
;IF NO MORE DATA, BRANCH TO END
;GET NEXT BYTE OF DATA
;TRANSMIT THE DATA
;DECREASE THE TXCNT
;EXIT
;GENERATE A STOP CONDITION
;RETURN FROM INTERRUPT
;LAST BYTE TO BE READ
;CHECK SECOND LAST BYTE TO BE
;READ
;NOT LAST ONE OR SECOND LAST
;SECOND LAST, DISABLE
;ACKNOWLEDGEMENT TRANSMITTING
;NXMAR
;LAST ONE, GENERATE STOP SIGNAL
;READ DATA AND STORE
MC68HC05L28
TPG

Related parts for MC68HC05L28B