參數(shù)資料
型號(hào): MC68HC05BD5P
廠商: FREESCALE SEMICONDUCTOR INC
元件分類: 微控制器/微處理器
英文描述: 8-BIT, MROM, 2.1 MHz, MICROCONTROLLER, PDIP40
封裝: PLASTIC, DIP-40
文件頁(yè)數(shù): 67/112頁(yè)
文件大?。?/td> 864K
代理商: MC68HC05BD5P
MOTOROLA
7-12
MC68HC05BD3
M-BUS SERIAL INTERFACE
7
MIF bit in the interrupt routine rst. The MCF bit can be cleared by reading the M-Bus Data I/O
Register (MDR) in receive mode or writing to the MDR in transmit mode. Software may serve the
M-Bus I/O in the main program by monitoring the MIF bit if the interrupt is disabled. The following
is an example of a software response by a master in transmit mode in the interrupt routine (see
ISR
BCLR
1,MSR
; CLEAR THE MIF FLAG
BRCLR
5,MCR,SLAVE
; CHECK THE MSTA FLAG,
; BRANCH IF SLAVE MODE
BRCLR
4,MCR,RECEIVE ; CHECK THE MODE FLAG,
; BRANCH IF IN RECEIVE MODE
BRSET
0,MSR,END
; CHECK ACK FROM RECEIVER
; IF NO ACK, END OF
; TRANSMISSION
TRANSMIT
LDA
DATABUF
; GET THE NEXT BYTE OF DATA
STA
MDR
; TRANSMIT THE DATA
7.4.4
Generation of the STOP Signal
A data transfer ends with a STOP signal generated by the master device. A master in transmit
mode can simply generate a STOP signal after all the data have been transmitted. The following
is an example showing how a STOP condition is generated by a master in transmit mode.
MASTX
BRSET
0,MSR,END
; IF NO ACK, BRANCH TO END
LDA
TXCNT
; GET VALUE FROM THE
; TRANSMITTING COUNTER
BEQ
END
; IF NO MORE DATA, BRANCH TO
; END
LDA
DATABUF
; GET NEXT BYTE OF DATA
STA
MDR
; TRANSMIT THE DATA
DEC
TXCNT
; DECREASE THE TXCNT
BRA
EMASTX
; EXIT
END
BCLR
5,MCR
; GENERATE A STOP CONDITION
EMASTX RTI
; RETURN FROM INTERRUPT
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 achieved by setting the transmit acknowledge bit
(TXAK) before reading the 2nd last byte of data. Before reading the last byte of data, a STOP
signal must be generated rst. The following is an example showing how a STOP signal is
generated by a master in receive mode.
MASR
DEC
RXCNT
BEQ
ENMASR
; LAST BYTE TO BE READ
LDA
RXCNT
DECA
; CHECK LAST 2ND BYTE TO BE READ
BNE
NXMAR
; NOT LAST ONE OR LAST SECOND
TPG
56
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.
相關(guān)PDF資料
PDF描述
MC68HC05BD3P 8-BIT, MROM, 2.1 MHz, MICROCONTROLLER, PDIP40
MC68HC05C9AFNR2 8-BIT, MROM, 2.1 MHz, MICROCONTROLLER, PQCC44
MC68HC05C9AFNR2 8-BIT, MROM, 2.1 MHz, MICROCONTROLLER, PQCC44
MC68HC05C9ACFNR2 8-BIT, MROM, 4.2 MHz, MICROCONTROLLER, PQCC44
MC68HC05C9AMB 8-BIT, MROM, 2.1 MHz, MICROCONTROLLER, PDIP42
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MC68HC05C0CP 制造商:Motorola Inc 功能描述:
MC68HC05C12 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS MICROCONTROLLER UNITS
MC68HC05C12B 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS MICROCONTROLLER UNITS
MC68HC05C12CP 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS MICROCONTROLLER UNITS
MC68HC05C12P 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS MICROCONTROLLER UNITS