DSPIC30F2010-20I/MM Microchip Technology, DSPIC30F2010-20I/MM Datasheet - Page 102

IC DSPIC MCU/DSP 12K 28QFN

DSPIC30F2010-20I/MM

Manufacturer Part Number
DSPIC30F2010-20I/MM
Description
IC DSPIC MCU/DSP 12K 28QFN
Manufacturer
Microchip Technology
Series
dsPIC™ 30Fr

Specifications of DSPIC30F2010-20I/MM

Core Processor
dsPIC
Core Size
16-Bit
Speed
20 MIPS
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, Motor Control PWM, QEI, POR, PWM, WDT
Number Of I /o
20
Program Memory Size
12KB (4K x 24)
Program Memory Type
FLASH
Eeprom Size
1K x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
2.5 V ~ 5.5 V
Data Converters
A/D 6x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-QFN
Core Frequency
40MHz
Core Supply Voltage
5.5V
Embedded Interface Type
I2C, SPI, UART
No. Of I/o's
20
Flash Memory Size
12KB
Supply Voltage Range
2.5V To 5.5V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
AC164322 - MODULE SOCKET MPLAB PM3 28/44QFN
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
Other names
DSPIC30F2010-20I/MMG
DSPIC30F201020IMM
DSPIC30F201020IMM
dsPIC30F2010
16.12 I
The master device generates all of the serial clock
pulses and the Start and Stop conditions. A transfer is
ended with a Stop condition or with a Repeated Start
condition. Since the Repeated Start condition is also
the beginning of the next serial transfer, the I
not be released.
In Master Transmitter mode, serial data is output
through SDA, while SCL outputs the serial clock. The
first byte transmitted contains the slave address of the
receiving device (7 bits) and the data direction bit. In
this case, the data direction bit (R_W) is logic ‘0’. Serial
data is transmitted 8 bits at a time. After each byte is
transmitted, an ACK bit is received. Start and Stop
conditions are output to indicate the beginning and the
end of a serial transfer.
In Master Receive mode, the first byte transmitted
contains the slave address of the transmitting device
(7 bits) and the data direction bit. In this case, the data
direction bit (R_W) is logic ‘1’. Thus, the first byte
transmitted is a 7-bit slave address, followed by a ‘1’ to
indicate receive bit. Serial data is received via SDA,
while SCL outputs the serial clock. Serial data is
received 8 bits at a time. After each byte is received, an
ACK bit is transmitted. Start and Stop conditions
indicate the beginning and end of transmission.
16.12.1
Transmission of a data byte, a 7-bit address or the
second half of a 10-bit address is accomplished by
simply writing a value to I2CTRN register. The user
should only write to I2CTRN when the module is in a
Wait state. This action will set the buffer full flag (TBF)
and allow the Baud Rate Generator to begin counting
and start the next transmission. Each bit of
address/data will be shifted out onto the SDA pin after
the falling edge of SCL is asserted. The Transmit
Status Flag, TRSTAT (I2CSTAT<14>), indicates that a
master transmit is in progress.
16.12.2
Master mode reception is enabled by programming the
receive enable (RCEN) bit (I2CCON<11>). The I
module must be Idle before the RCEN bit is set,
otherwise the RCEN bit will be disregarded. The Baud
Rate Generator begins counting, and on each rollover,
the state of the SCL pin toggles, and data is shifted in
to the I2CRSR on the rising edge of each clock.
DS70118H-page 102
2
C Master Operation
I
I
2
2
C MASTER TRANSMISSION
C MASTER RECEPTION
2
C bus will
2
C
16.12.3
In I
located in the I2CBRG register. When the BRG is
loaded with this value, the BRG counts down to ‘0’ and
stops until another reload has taken place. If clock
arbitration is taking place, for instance, the BRG is
reloaded when the SCL pin is sampled high.
As per the I
400 kHz. However, the user can specify any baud rate
up to 1 MHz. I2CBRG values of ‘0’ or ‘1’ are illegal.
EQUATION 16-1:
16.12.4
Clock arbitration occurs when the master de-asserts
the SCL pin (SCL allowed to float high) during any
receive, transmit or Restart/Stop condition. When the
SCL pin is allowed to float high, the Baud Rate
Generator is suspended from counting until the SCL
pin is actually sampled high. When the SCL pin is
sampled high, the Baud Rate Generator is reloaded
with the contents of I2CBRG and begins counting. This
ensures that the SCL high time will always be at least
one BRG rollover count in the event that the clock is
held low by an external device.
16.12.5
Multi-Master operation support is achieved by bus
arbitration. When the master outputs address/data bits
onto the SDA pin, arbitration takes place when the
master outputs a ‘1’ on SDA, by letting SDA float high
while another master asserts a ‘0’. When the SCL pin
floats high, data should be stable. If the expected data
on SDA is a ‘1’ and the data sampled on the SDA
pin = 0, then a bus collision has taken place. The
master will set the MI2CIF pulse and reset the master
portion of the I
If a transmit was in progress when the bus collision
occurred, the transmission is halted, the TBF flag is
cleared, the SDA and SCL lines are de-asserted, and a
value can now be written to I2CTRN. When the user
services the I
Routine, if the I
user can resume communication by asserting a Start
condition.
2
C Master mode, the reload value for the BRG is
I2CBRG
BAUD RATE GENERATOR
CLOCK ARBITRATION
MULTI-MASTER COMMUNICATION,
BUS COLLISION AND BUS
ARBITRATION
2
C standard, FSCK may be 100 kHz or
2
C port to its Idle state.
2
2
C bus is free (i.e., the P bit is set) the
C master event Interrupt Service
=
I2CBRG VALUE
---------- -
Fscl
Fcy
© 2008 Microchip Technology Inc.
-------------------------- -
1 111 111
,
Fcy
,
1

Related parts for DSPIC30F2010-20I/MM