поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

PIC17C752-08/CL датащи(PDF) 174 Page - Microchip Technology

номер детали PIC17C752-08/CL
подробное описание детали  High-Performance 8-Bit CMOS EPROM Microcontrollers with 10-bit A/D
PDF  328 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  MICROCHIP [Microchip Technology]
домашняя страница  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC17C752-08/CL датащи(HTML) 174 Page - Microchip Technology

Back Button PIC17C752-08/CL Datasheet HTML 170Page - Microchip Technology PIC17C752-08/CL Datasheet HTML 171Page - Microchip Technology PIC17C752-08/CL Datasheet HTML 172Page - Microchip Technology PIC17C752-08/CL Datasheet HTML 173Page - Microchip Technology PIC17C752-08/CL Datasheet HTML 174Page - Microchip Technology PIC17C752-08/CL Datasheet HTML 175Page - Microchip Technology PIC17C752-08/CL Datasheet HTML 176Page - Microchip Technology PIC17C752-08/CL Datasheet HTML 177Page - Microchip Technology PIC17C752-08/CL Datasheet HTML 178Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 174 / 328 page
background image
PIC17C7XX
DS30289A-page 174
© 1998 Microchip Technology Inc.
15.4
Example Program
Example 15-2 shows MPLAB-C17 ’C’ code for using
the I2C module in master mode to communicate with a
24LC01B serial EEPROM. This example uses the
PICmicro ’C’ libraries included with MPLAB-C17.
EXAMPLE 15-2: INTERFACING TO A 24LC01B SERIAL EEPROM (USING MPLAB-C17)
// Include necessary header files
#include <p17c756.h>
// Processor header file
#include <delays.h>
// Delay routines header file
#include <stdlib.h>
// Standard Library header file
#include <i2c16.h>
// I2C routines header file
#define CONTROL 0xa0
// Control byte definition for 24LC01B
// 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;
// I2C address of 24LC01B
static unsigned char datao;
// Data written to 24LC01B
static unsigned char datai;
// Data read from 24LC01B
address = 0;
// Preset address to 0
OpenI2C(MASTER,SLEW_ON);
// Configure I2C Module Master mode, Slew rate control on
SSPADD = 39;
// Configure clock for 100KHz
while(address<128)
// Loop 128 times, 24LC01B is 128x8
{
datao = PORTB;
do
{
ByteWrite(address,datao);
// Write data to EEPROM
ACKPoll();
// Poll the 24LC01B for state
datai = ByteRead(address);
// Read data from EEPROM into SSPBUF
} while(datai != datao);
// Loop as long as data not correctly
//
written to 24LC01B
address++;
// Increment address
}
while(1)
// Done writing 128 bytes to 24LC01B, Loop forever
{
Nop();
}
}



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


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
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