Electronic Components Datasheet Search
  English  ▼

X  

PIC16F767 Datasheet(PDF) 108 Page - Microchip Technology

Part # PIC16F767
Description  28/40/44-Pin, 8-Bit CMOS Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology
PDF  276 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F767 Datasheet(HTML) 108 Page - Microchip Technology

Back Button PIC16F767 Datasheet HTML 104Page - Microchip Technology PIC16F767 Datasheet HTML 105Page - Microchip Technology PIC16F767 Datasheet HTML 106Page - Microchip Technology PIC16F767 Datasheet HTML 107Page - Microchip Technology PIC16F767 Datasheet HTML 108Page - Microchip Technology PIC16F767 Datasheet HTML 109Page - Microchip Technology PIC16F767 Datasheet HTML 110Page - Microchip Technology PIC16F767 Datasheet HTML 111Page - Microchip Technology PIC16F767 Datasheet HTML 112Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 108 / 276 page
background image
PIC16F7X7
DS30498C-page 106
 2004 Microchip Technology Inc.
10.4.2
OPERATION
The MSSP module functions are enabled by setting
MSSP enable bit, SSPEN (SSPCON<5>).
The SSPCON register allows control of the I2C opera-
tion. Four mode selection bits (SSPCON<3:0>) allow
one of the following I2C modes to be selected:
•I2C Master mode, clock = Oscillator/4 (SSPADD + 1)
•I2C Slave mode (7-bit address)
•I2C Slave mode (10-bit address)
•I2C Slave mode (7-bit address), with Start and
Stop bit interrupts enabled
•I2C Slave mode (10-bit address), with Start and
Stop bit interrupts enabled
•I2C Firmware Controlled Master mode, slave is Idle
Selection of any I2C mode, with the SSPEN bit set,
forces the SCL and SDA pins to be open-drain, pro-
vided these pins are programmed to inputs by setting
the appropriate TRISC bits. To ensure proper operation
of the module, pull-up resistors must be provided
externally to the SCL and SDA pins.
10.4.3
SLAVE MODE
In Slave mode, the SCL and SDA pins must be config-
ured as inputs (TRISC<4:3> set). The MSSP module
will override the input state with the output data when
required (slave-transmitter).
To ensure proper communication of the I2C Slave
mode, the TRIS bits (TRISx [SDA, SCL]) correspond-
ing to the I2C pins must be set to ‘1’. If any TRIS bits
(TRISx<7:0>) of the port containing the I2C pins
(PORTx [SDA, SCL]) are changed in software, during
I2C
communication
using
a
Read-Modify-Write
instruction (BSF, BCF), then the I2C mode may stop
functioning properly and I2C communication may
suspend. Do not change any of the TRISx bits (TRIS
bits of the port containing the I2C pins) using the
instruction BSF or BCF during I2C communication. If it
is absolutely necessary to change the TRISx bits
during communication, the following method can be
used:
The I2C Slave mode hardware will always generate an
interrupt on an address match. Through the mode
select bits, the user can also choose to interrupt on
Start and Stop bits.
When an address is matched, or the data transfer after
an address match is received, the hardware automati-
cally will generate the Acknowledge (ACK) pulse and
load the SSPBUF register with the received value
currently in the SSPSR register.
Any combination of the following conditions will cause
the MSSP module not to give this ACK pulse:
• The Buffer Full bit, BF (SSPSTAT<0>), was set
before the transfer was received.
• The overflow bit, SSPOV (SSPCON<6>), was set
before the transfer was received.
In this case, the SSPSR register value is not loaded
into the SSPBUF, but bit SSPIF (PIR1<3>) is set. The
BF bit is cleared by reading the SSPBUF register, while
bit SSPOV is cleared through software.
The SCL clock input must have a minimum high and
low for proper operation. The high and low times of the
I2C specification, as well as the requirement of the
MSSP module, are shown in timing parameter #100
and parameter #101.
10.4.3.1
Addressing
Once the MSSP module has been enabled, it waits for
a Start condition to occur. Following the Start condition,
the 8 bits are shifted into the SSPSR register. All incom-
ing bits are sampled with the rising edge of the clock
(SCL) line. The value of register SSPSR<7:1> is
compared to the value of the SSPADD register. The
address is compared on the falling edge of the eighth
clock (SCL) pulse. If the addresses match and the BF
and SSPOV bits are clear, the following events occur:
1.
The SSPSR register value is loaded into the
SSPBUF register.
2.
The Buffer Full bit, BF, is set.
3.
An ACK pulse is generated.
4.
MSSP Interrupt Flag bit, SSPIF (PIR1<3>), is
set (interrupt is generated if enabled) on the
falling edge of the ninth SCL pulse.
MOVF
TRISC, W
; Example for a 40-pin part such as the PIC16F877A
IORLW
0x18
; Ensures <4:3> bits are ‘11’
ANDLW
B’11111001’
; Sets <2:1> as output, but will not alter other bits
; User can use their own logic here, such as IORLW, XORLW and ANDLW
MOVWF
TRISC



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com