Table of Contents
MOTOROLA
MC68307 USER’S MANUAL
xi
6.3
Programming Model...................................................................................... 6-4
6.3.1
General Purpose Timer Units ..................................................................... 6-4
6.3.1.1
Timer Mode Register (TMR1, TMR2) ....................................................... 6-4
6.3.1.2
Timer Reference Registers (TRR1, TRR2)............................................... 6-5
6.3.1.3
Timer Capture Registers (TCR1, TCR2) .................................................. 6-5
6.3.1.4
Timer Counter (TCN1, TCN2)................................................................... 6-5
6.3.1.5
Timer Event Registers (TER1, TER2) ...................................................... 6-6
6.3.2
Software Watchdog Timer .......................................................................... 6-7
6.3.2.1
Watchdog Reference Register (WRR)...................................................... 6-7
6.3.2.2
Watchdog Counter Register (WCR) ......................................................... 6-7
6.4
Timer Programming Examples ..................................................................... 6-8
6.4.1
Initialization and Reference Compare Function .......................................... 6-8
6.4.2
Event Counting Function and Interrupts ..................................................... 6-9
6.4.3
Input Capture Function ............................................................................... 6-9
6.4.4
Watchdog Usage Example ....................................................................... 6-10
Section 7
M-Bus Interface Module
7.1
M-Bus System Configuration ........................................................................ 7-2
7.2
M-Bus Protocol ............................................................................................. 7-2
7.2.1
START Signal ............................................................................................. 7-3
7.2.2
Slave Address Transmission ...................................................................... 7-3
7.2.3
Data Transfer .............................................................................................. 7-3
7.2.4
Repeated START Signal ............................................................................ 7-4
7.2.5
STOP Signal ............................................................................................... 7-4
7.2.6
Arbitration Procedure .................................................................................. 7-4
7.2.7
Clock Synchronization ................................................................................ 7-4
7.2.8
Handshaking ............................................................................................... 7-5
7.2.9
Clock Stretching.......................................................................................... 7-5
7.3
Programming Model...................................................................................... 7-5
7.3.1
M-Bus Address Register (MADR) ............................................................... 7-6
7.3.2
M-Bus Frequency Divider Register (MFDR) ............................................... 7-6
7.3.3
M-Bus Control Register (MBCR) ................................................................ 7-7
7.3.4
M-Bus Status Register (MBSR) .................................................................. 7-9
7.3.5
M-Bus Data I/O Register (MBDR)............................................................. 7-10
7.4
M-Bus Programming Examples .................................................................. 7-10
7.4.1
Initialization Sequence .............................................................................. 7-10
7.4.2
Generation of START ............................................................................... 7-11
7.4.3
Post-Transfer Software Response............................................................ 7-11
7.4.4
Generation of STOP ................................................................................. 7-12
7.4.5
Generation of Repeated START............................................................... 7-13
7.4.6
Slave Mode ............................................................................................... 7-13
7.4.7
Arbitration Lost.......................................................................................... 7-13