cp3bt13 National Semiconductor Corporation, cp3bt13 Datasheet - Page 156
cp3bt13
Manufacturer Part Number
cp3bt13
Description
Cp3bt13 Reprogrammable Connectivity Processor With Bluetooth-r And Can Interfaces
Manufacturer
National Semiconductor Corporation
Datasheet
1.CP3BT13.pdf
(232 pages)
- Current page: 156 of 232
- Download datasheet (3Mb)
www.national.com
21.4.1
A Bus Error (BER) may occur during a write transaction if
the data register is written at a very specific time. The mod-
ule generates one system-clock cycle setup time of SDA to
SCL vs. the minimum time of the clock divider ratio.
The problem can be masked within the driver by dynamical-
ly dividing-by-half the SCL width immediately after the slave
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
; NAME: ACBRead
;
;
;
;
;
; PARAMETERS:
;
;
;
;
; CALLS:
;
; RETURNED: error status
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
UWORD
{
KBD_OUT &= ~BIT0;
KBD_OUT &= ~BIT0;
KBD_OUT &= ~BIT0;
//
ACB_T
UBYTE
UWORD
acb =
if (Addrs != NextAddress) {
KeyInit();
}
if ((err = ACBStartX (Slave | (Addrs >> 7 & 0x0E), ACB_READ, Count)))
rcv =
while (Count) {
}
KBD_OUT &= ~BIT0;
ACBRead (UBYTE Slave, UWORD Addrs, UWORD Count, UBYTE *buf)
NextAddress =
if ((err = ACBStartX (Slave | (Addrs >> 7 & 0x0E), ACB_WRITE, 0)))
acb->ACBsda =
Timeout =
while (!(acb->ACBst & ACBSDAST) && !(acb->ACBst & ACBBER) && Timeout--);
if (acb->ACBst & ACBBER) {
}
if (!Timeout)
return (err);
if (Count-- == 1)
Timeout =
while (!(acb->ACBst & ACBSDAST) && Timeout--);
if (!Timeout)
*rcv++
NextAddress++;
Avoiding Bus Error During Write Transaction
ACBStartX
*acb;
err, *rcv;
Timeout;
(ACB_T*)ACB_ADDRESS;
return (err);
acb->ACBst
return (ACBERR_COLLISION);
return (ACBERR_TIMEOUT);
buf;
acb->ACBctl1
return (ACBERR_TIMEOUT);
UBYTE
UWORD
UWORD
UBYTE
=
Reads "Count" byte(s) from selected I2C Slave.
Read or Write operation (as recorded in NextAddress), a "dummy" write transaction is
initiated to reset the address to the desired location.
Start sequence and the Read transaction.
which sends the Start condition and Slave address.
1000;
1000;
acb->ACBsda;
Slave
Addrs
Count
*buf
Addrs;
(UBYTE)Addrs;
|=
ACBBER;
|=
-
-
-
-
ACBACK;
Slave Device Address. Must be of format 0xXXXX0000
Byte/Array address (extended addressing mode uses two byte address)
Number of bytes to read
Pointer to receive buffer
/* Set pointer to ACB module
/* If the indicated address differs from the last
/* recorded access (i.e. Random Read), we must first
/* send a "dummy" write to the desired new address..
/* Update last address placeholder
/* Send start bit and Slave address...
/* If unsuccessful, return error code
/* Send new address byte
/* Set timeout
/* Wait for xmitter to be ready...zzzzzzzzz
/* If a bus error occurs while sending address, clear
/* the error flag and return error status
/* If we timeout, return error
/* (Re)Send start bit and Slave address...
/* If error, return
/* Get address of read buffer
/* Read Count bytes into user’s buffer
/* If this the final byte, or only one requested, send
/* the NACK bit after reception
/* Set timeout
/* Timed out??
/* YES - return error
/* NO - Read byte from Recv register
/* Adjust current address placeholder
156
address is successfully sent and before writing to the ACB-
SDA register. This has the effect of forcing SCL into the
stretch state.
The following code example is the relevant segment of the
ACCESS.bus driver addressing this issue.
All transactions begin with a call to ACBStartX
If read address differs from previous
Checks for errors throughout process.
This is followed by a repeated
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
Related parts for cp3bt13
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Freescale Semiconductor Technical Data
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Self-calibrating 12-bit Plus Sign Serial I/o A/d Converters With Mux And Sample/hold
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Pllatinum Tm Fractional N Rf / Integer N If Dual Low Power Frequency Synthesizer
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Pllatinum? 2.0 Ghz Frequency Synthesizer For Rf Personal Communications
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Pllatinumtm 160 Mhz Frequency Synthesizer For Rf Personal Communications
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Dual N-channel Enhancement Mode Field Effect Transistor
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Video Amplifier System (obsolete)
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Synchronous Step-up DC/DC Converter For White Led Applications
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
CLC420 - High Speed, Voltage Feedback op Amp, Package: Lcc, Pin Nb=20
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Monolithic Triple 4.5 CRT Driver
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Differential Video Amplifier
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
ADC10061 - 10-Bit 600 NS A/D Converter With Input Multiplexer And Sample/Hold, Package: Soic Wide, Pin Nb=20
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
DS36277 - Dominant Mode Multipoint Transceiver, Package: Soic Narrow, Pin Nb=8
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Printer Solenoid Driver
Manufacturer:
National Semiconductor Corporation
Datasheet:
Part Number:
Description:
Quad High Speed Trapezoidal Bus Transceiver
Manufacturer:
National Semiconductor Corporation
Datasheet: