MC68HC705BD3 FREESCALE [Freescale Semiconductor, Inc], MC68HC705BD3 Datasheet - Page 57

no-image

MC68HC705BD3

Manufacturer Part Number
MC68HC705BD3
Description
High-density complementary metal oxide semiconductor (HCMOS) microcontroller unit
Manufacturer
FREESCALE [Freescale Semiconductor, Inc]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MC68HC705BD32B
Manufacturer:
MOT
Quantity:
57
Part Number:
MC68HC705BD3P
Manufacturer:
MOTOROLA
Quantity:
2 852
Part Number:
MC68HC705BD3P
Manufacturer:
MOT
Quantity:
5 173
7.4
7.4.1
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.
7.4.2
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 first byte (the slave address) can be sent. An example program which
generates the START signal and transmits the first data byte (slave address) is shown below:
CHFLAG
TXSTART
7.4.3
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 finished. 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
MC68HC05BD3
1) Update Frequency Divider Register (MFDR) to select an SCL frequency.
2) Update M-Bus Address Register (MADR) to define its own slave address.
3) Set MEN bit of M-Bus Control Register (MCR) to enable the M-Bus interface
4) Modify the bits of M-Bus Control Register (MCR) to select Master/Slave
system.
mode, Transmit/Receive mode, interrupt enable or not.
Programming Considerations
Initialization
Generation of a START Signal and
the First Byte of Data Transfer
Software Responses after Transmission or
Reception of a Byte
SEI
BRSET 5,MSR,CHFLAG ; CHECK THE MBB BIT OF THE
BSET
BSET
LDA
STA
CLI
4,MCR
5,MCR
#CALLING
MDR
M-BUS SERIAL INTERFACE
; DISABLE INTERRUPT
; STATUS REGISTER. IF IT IS
; SET, WAIT UNTIL IT IS CLEAR
; SET MASTER MODE
; i.e. GENERATE START CONDITION
; GET THE CALLING ADDRESS
; TRANSMIT THE CALLING
; ADDRESS
; ENABLE INTERRUPT
; SET TRANSMIT MODE
TPG
7-11
7

Related parts for MC68HC705BD3