mcf5407 Freescale Semiconductor, Inc, mcf5407 Datasheet - Page 247
![no-image](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_sml.jpg)
mcf5407
Manufacturer Part Number
mcf5407
Description
Mcf5407 Coldfire Integrated Microprocessor User
Manufacturer
Freescale Semiconductor, Inc
Datasheet
1.MCF5407.pdf
(546 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
mcf5407AI162
Manufacturer:
FREESCALE
Quantity:
201
Company:
Part Number:
mcf5407AI162
Manufacturer:
FREESCAL
Quantity:
132
Company:
Part Number:
mcf5407AI162
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Company:
Part Number:
mcf5407AI220
Manufacturer:
freescaie
Quantity:
6
Company:
Part Number:
mcf5407AI220
Manufacturer:
Freescale Semiconductor
Quantity:
135
Company:
Part Number:
mcf5407AI220
Manufacturer:
FREESCALE
Quantity:
1 831
Company:
Part Number:
mcf5407AI220
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Company:
Part Number:
mcf5407CAI162
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
- Current page: 247 of 546
- Download datasheet (7Mb)
The free time between a STOP and the next START condition is built into the hardware that
generates the START cycle. Depending on the relative frequencies of the system clock and
the SCL period, it may be necessary to wait until the I
address to the I2DR before proceeding with the following instructions.
The following example signals START and transmits the first byte of data (slave address):
CHFLAG
TXSTART MOVE.B I2CR,-(A0);Set transmit mode
IFREE
8.6.3 Post-Transfer Software Response
Sending or receiving a byte sets the I2SR[ICF], which indicates one byte communication
is finished. I2SR[IIF] is also set. An interrupt is generated if the interrupt function is
enabled during initialization by setting I2CR[IIEN]. Software must first clear IIF in the
interrupt routine. ICF is cleared either by reading from I2DR in receive mode or by writing
to I2DR in transmit mode.
Software can service the I
function is disabled. Polling should monitor IIF rather than ICF because that operation is
different when arbitration is lost.
When an interrupt occurs at the end of the address cycle, the master is always in transmit
mode; that is, the address is sent. If master receive mode is required (I2DR[R/W],
I2CR[MTX] should be toggled.
During slave-mode address cycles (I2SR[IAAS] = 1), I2SR[SRW] is read to determine the
direction of the next transfer. MTX is programmed accordingly. For slave-mode data cycles
(IAAS = 0), SRW is invalid. MTX should be read to determine the current transfer
direction.
The following is an example of a software response by a master transmitter in the interrupt
routine (see Figure 8-10).
I2SR
MOVE.B I2SR,-(A0);Check I2SR[MBB]
BTST.B #5, (A0)+
BNE.S CHFLAG;If I2SR[MBB] = 1, wait until it is clear
BSET.B #4,(A0)
MOVE.B (A0)+, I2CR
MOVE.B I2CR, -(A0);Set master mode
BSET.B #5, (A0);Generate START condition
MOVE.B (A0)+, I2CR
MOVE.B CALLING,-(A0);Transmit the calling address, D0=R/W
MOVE.B (A0)+, I2DR
MOVE.B I2SR,-(A0);Check I2SR[MBB]
BTST.B #5, (A0)+;
BEQ.S IFREE;
LEA.L I2SR,-(A7);Load effective address
BCLR.B #1,(A7)+;Clear the IIF flag
MOVE.B I2CR,-(A7);Push the address on stack,
BTST.B #5,(A7)+;check the MSTA flag
BEQ.S SLAVE;Branch if slave mode
MOVE.B I2CR,-(A7);Push the address on stack
BTST.B #4,(A7)+;check the mode flag
;If it is clear, wait until it is set.
2
C I/O in the main program by monitoring IIF if the interrupt
Chapter 8. I
2
C Module
2
C is busy after writing the calling
I
2
C Programming Examples
8-11
Related parts for mcf5407
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![MC14560BCP](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC12034AP](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MPIC2112P](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC14520BCP](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC12026AP](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC145152P2](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC68HC11A0P](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MCM6726DWJ10](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC44355](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC13282AP](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC14519BCP](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC14495P1](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![SN74LS796N](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC142100CP](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC34014P](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet: