参数资料
型号: MC68HC05BS8FB
厂商: FREESCALE SEMICONDUCTOR INC
元件分类: 微控制器/微处理器
英文描述: 8-BIT, MROM, 2.2 MHz, MICROCONTROLLER, PQFP44
封装: PLASTIC, QFP-44
文件页数: 98/128页
文件大小: 9691K
代理商: MC68HC05BS8FB
MC68HC05BS8
M-BUS SERIAL INTERFACE
8
8.4
Programming Considerations
8.4.1
Initialization
Reset will put the M-Bus Control register to its default status. Before the interface can be used to
transfer serial data, the following initialization procedure must be carried out.
1) Update Frequency Divider Register (MFDR) to select an SCL frequency.
2) Update M-Bus Address Register (MADR) to dene its own slave address.
3) Set MEN bit of M-Bus Control Register (MCR) to enable the M-Bus interface
system.
4) Modify the bits of M-Bus Control Register (MCR) to select Master/Slave
mode, Transmit/Receive mode, interrupt enable or not.
8.4.2
Generation of a START Signal and
the First Byte of Data Transfer
After completion of the initialization procedure, serial data can be transmitted by selecting the
master transmit mode. If the device is connected to a multi-master bus system, the state of the
M-Bus busy bit (MBB) must be tested to check if the serial bus is free. If the bus is free (MBB=0),
the START condition and the rst byte (the slave address) can be sent. An example program which
generates the START signal and transmits the rst data byte (slave address) is shown below:
SEI
; DISABLE INTERRUPT
CHFLAG
BRSET
5,MSR,CHFLAG
; CHECK THE MBB BIT OF THE
; STATUS REGISTER. IF IT IS
; SET, WAIT UNTIL IT IS CLEAR
TXSTART
BSET
4,MCR
; SET TRANSMIT MODE
BSET
5,MCR
; SET MASTER MODE
; i.e. GENERATE START CONDITION
LDA
#CALLING
; GET THE CALLING ADDRESS
STA
MDR
; TRANSMIT THE CALLING
; ADDRESS
CLI
; ENABLE INTERRUPT
8.4.3
Software Responses after Transmission or
Reception of a Byte
Upon the completion of the transmission or reception of a data byte, the data transferring bit (MCF)
will be set, indicating one byte communication has been nished. The M-Bus interrupt bit (MIF)
will also be set to generate an M-Bus interrupt if the interrupt is enabled. Software must clear the
TPG
69
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
..
.
相关PDF资料
PDF描述
MC68HC705C9CFN 8-BIT, OTPROM, 2 MHz, MICROCONTROLLER, PQCC44
MC68HC705C9FN 8-BIT, OTPROM, 2 MHz, MICROCONTROLLER, PQCC44
MC68HC705C9P 8-BIT, OTPROM, 2 MHz, MICROCONTROLLER, PDIP40
MC68HC705E5DW 8-BIT, OTPROM, 2.1 MHz, MICROCONTROLLER, PDSO28
MC68HC705G1B 8-BIT, OTPROM, 2.1 MHz, MICROCONTROLLER, PDIP56
相关代理商/技术参数
参数描述
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