MCP9804 Microchip Technology, MCP9804 Datasheet - Page 44

no-image

MCP9804

Manufacturer Part Number
MCP9804
Description
Accuracy Digital Temperature Sensor
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MCP9804-E/MC
Manufacturer:
MICROCHIP
Quantity:
3 100
Part Number:
MCP9804-E/MC
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP9804-E/MC
0
Part Number:
MCP9804-E/MS
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP9804-E/MS
Manufacturer:
MICROCHI
Quantity:
20 000
Part Number:
MCP9804-E/MS
Quantity:
510
Part Number:
MCP9804-E/MS
0
Part Number:
MCP9804T-E/MC
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP9804T-E/MC
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP9804T-E/MS
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP9804T-E/MS
0
MCP9804
/********************************************************************
**************************************************************/
#include"p18f2550.h" // This code is developed for PIC18F2550
//It can be modified to be used with any PICmicro with MSSP module
#include "I2C.h"
/********************************************************************
*
*
*
*
*
*
********************************************************************/
void OpenI2C(unsigned char sync_mode, unsigned char slew)
{
}
/********************************************************************
*
*
*
*
********************************************************************/
void I2CStart(void)
{
}
DS22203A-page 44
FileName:
Dependencies: I2C.h
Processor:PIC18 Microcontrollers
Complier:
Company:Microchip Technology, Inc.
Software License Agreement:
The software supplied herewith by Microchip Technology Incorporated
(the “Company”) for its PIC® Microcontroller is intended and
supplied to you, the Company’s customer, for use solely and
exclusively on Microchip PIC Microcontroller products. The
software is owned by the Company and/or its supplier, and is
protected under applicable copyright laws. All rights are reserved.
Any use in violation of the foregoing restrictions may subject the
user to criminal sanctions under applicable laws, as well as to
civil liability for the breach of the terms and conditions of this
license.
THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES,
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
SSPSTAT &= 0x3F;
SSPCON1 = 0x00;
SSPCON2 = 0x00;
SSPCON1 |= sync_mode;
SSPSTAT |= slew;
SSPCON1bits.SSPEN = 1;
PIR1bits.SSPIF = 0;//Clear Interrupt
SSPCON2bits.SEN=1;
while(!PIR1bits.SSPIF);//Wait for data received Interrupt
PIR1bits.SSPIF = 0;//Clear Interrupt
Function Name:
Return Value:
Parameters:
Description:
Function Name:
Return Value:
Parameters:
Description:
Microchip C18 (for PIC18) or C30 (for PIC24)
I2C.c
OpenI2C1
void
SSP1 peripheral setup bytes
This function sets up the SSP1 module on a
PIC18CXXX device for use with a Microchip I2C
EEPROM device or I2C bus device.
I2CStart
void
void
*
// power on state
// power on state
// power on state
// select serial mode
// slew rate on/off
// enable synchronous serial port
*
*
*
*
*
*
© 2009 Microchip Technology Inc.
www.DataSheet4U.com

Related parts for MCP9804