PIC17LC756-08I/L Microchip Technology, PIC17LC756-08I/L Datasheet - Page 176

no-image

PIC17LC756-08I/L

Manufacturer Part Number
PIC17LC756-08I/L
Description
MICRO CTRL 16K LOW PWR 68PLCC
Manufacturer
Microchip Technology
Series
PIC® 17Cr
Datasheets

Specifications of PIC17LC756-08I/L

Core Processor
PIC
Core Size
8-Bit
Speed
8MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
50
Program Memory Size
32KB (16K x 16)
Program Memory Type
OTP
Ram Size
902 x 8
Voltage - Supply (vcc/vdd)
3 V ~ 6 V
Data Converters
A/D 12x10b
Oscillator Type
External
Operating Temperature
-40°C ~ 85°C
Package / Case
68-PLCC
Lead Free Status / RoHS Status
Request inventory verification / Request inventory verification
Eeprom Size
-
PIC17C7XX
15.4
Example 15-2 shows MPLAB
the I
24LC01B serial EEPROM. This example uses the
PICmicro
EXAMPLE 15-2:
DS30289B-page 176
// Include necessary header files
#include <p17c756.h>
#include <delays.h>
#include <stdlib.h>
#include <i2c16.h>
#define CONTROL 0xa0
// Function declarations
void main(void);
void WritePORTD(static unsigned char data);
void ByteWrite(static unsigned char address,static unsigned char data);
unsigned char ByteRead(static unsigned char address);
void ACKPoll(void);
// Main program
void main(void)
{
static unsigned char address;
static unsigned char datao;
static unsigned char datai;
}
2
C module in Master mode to communicate with a
address = 0;
OpenI2C(MASTER,SLEW_ON);
SSPADD = 39;
while(address<128)
{
}
while(1)
{
}
Example Program
®
datao = PORTB;
do
{
} while(datai != datao);
address++;
Nop();
’C’ libraries included with MPLAB C17.
ByteWrite(address,datao);
ACKPoll();
datai = ByteRead(address);
INTERFACING TO A 24LC01B SERIAL EEPROM (USING MPLAB C17)
®
// Processor header file
// Delay routines header file
// Standard Library header file
// I2C routines header file
// Control byte definition for 24LC01B
C17 ’C’ code for using
// I2C address of 24LC01B
// Data written to 24LC01B
// Data read from 24LC01B
// Preset address to 0
// Configure I2C Module Master mode, Slew rate control on
// Configure clock for 100KHz
// Loop 128 times, 24LC01B is 128x8
// Write data to EEPROM
// Poll the 24LC01B for state
// Read data from EEPROM into SSPBUF
// Loop as long as data not correctly
//
// Increment address
// Done writing 128 bytes to 24LC01B, Loop forever
written to 24LC01B
2000 Microchip Technology Inc.

Related parts for PIC17LC756-08I/L