Tag archives for I²C

MPLAB® Code Configurator

image-1477
The MPLAB® Code Configurator (MCC) is a user friendly Graphical User Interface (GUI) plug-in tool for MPLAB® X IDE which generates easy to understand C code that is inserted into an MPLAB® X project, based on the settings peripherals configurations and selections made in the Graphical User Interface (GUI). The generated code can be used in any application program. When starting out with a new project using Microchip 8-bit microcontrollers, setup of the configuration and all the peripherals can be time consuming, especially for new projects. The MPLAB® Code Configurator simplifies this down to a series of simple graphical selections from the menus within the MCC.

Digital Clock using PIC Microcontroller and the DS1307 Real Time Clock – MikroC

image-128
Real Time Clock and Calendar functions are very important in many projects especially in data logging devices where a real time stamp is required in each record. This clock uses the DS1307 which is a low power serial real time clock/calender with full binary coded decimal (BCD) clock/calendar plus 56 bytes of Non Volatile Static RAM. This chip provides year, month, date, hour, minute and second information. The end date of months is automatically adjusted for months fewer than 31 days including leap year compensation up to year 2100. In this article we are going to design a digital clock using the DS1307 RTC with MikroC Pro for PIC compiler

Interfacing The PCF8583 Real Time Clock With PIC Microcontroller – MikroC

image-323
The PCF8583 is a small 8-pin clock and calendar chip from NXP Semiconductors with full binary coded decimal (BCD) clock/calendar plus 2048 RAM (256 by 8 RAM memory) that is used in microcontroller based systems to provide real time date and time information. Data and Addresses are transferred serially through a bidirectional I2C bus. The PCF8583 RTC provides year, month, date, hour, minute and second information. The built-in word address register is incremented automatically after each written or read data byte. Address pin A0 is used for programming the hardware address, allowing the connection of two devices to the bus without additional hardware

Interfacing The DS1307 Real Time Clock With PIC Microcontroller – MikroC

image-326
The DS1307 is a low power serial real time clock/calendar with full binary coded decimal (BCD) clock/calendar plus 56 bytes of Non Volatile Static RAM. The RTC provides year, month, date, hour, minute and second information. The end date of months is automatically adjusted for months fewer than 31 days including leap year compensation up to year 2100. It can operate either in 24-hour format or 12-hour format with AM/PM indicator. Data and Address are transferred serially through a bidirectional I2C bus. DS1307 comes with built-in power sensing circuit which senses power failures and automatically switches to back up supply. Timekeeping operation continues while the part operates from the backup supply. The DS1307 RTC uses an external 32.768kHz Crystal Oscillator and it does not requires any external resistors or capacitors to operate. In this article we will learn how to set, get and display RTC values from DS1307 to LCD using mikroC compiler.

Digital Clock using PIC Microcontroller and the DS1307 Real Time Clock – XC8 Compiler

image-158
Real Time Clock and Calendar functions are very important in many projects especially in data logging devices where a real time stamp is required in each record. This clock uses the DS1307 which is a low power serial real time clock/calender with full binary coded decimal (BCD) clock/calendar plus 56 bytes of Non Volatile Static RAM. This chip provides year, month, date, hour, minute and second information. The end date of months is automatically adjusted for months fewer than 31 days including leap year compensation up to year 2100.

Interfacing The DS1307 Real Time Clock With PIC Microcontroller – XC8

image-280
The DS1307 is a low power serial real time clock/calender with full binary coded decimal (BCD) clock/calendar plus 56 bytes of Non Volatile Static RAM. The RTC provides year, month, date, hour, minute and second information. The end date of months is automatically adjusted for months fewer than 31 days including leap year compensation up to year 2100. It can operate either in 24-hour format or 12-hour format with AM/PM indicator. Data and Address are transferred serially through a bidirectional I2C bus. DS1307 comes with built-in power sensing circuit which senses power failures and automatically switches to back up supply. Timekeeping operation continues while the part operates from the backup supply. The DS1307 RTC uses an external 32.768kHz Crystal Oscillator and it does not requires any external resistors or capacitors to operate.

PIC Microcontroller Communication with I2C Bus – MikroC

image-348
The I2C or Inter-Integrated Circuit is a serial communication and allows multiple devices to communicate with a micocontroller(s) over only two wires. The devices don't have to be identical as long as they support I²C protocol. Communication takes place from the master (PIC) to the individual selected slave only as shown in this illustration, the master sends data to the slave address 2 only. I²C with MikroC Pro for PIC

PIC Microcontroller Communication with I²C Bus – XC8

image-287
The I²C or Inter-Integrated Circuit is a serial communication and allows multiple devices to communicate with a micocontroller(s) over only two wires. The devices don't have to be identical as long as they support I²C protocol. In our illustration, the first device with address 1 is a digital temperature sensor, the second one is a real time clock and the third one is a serial LCD display and the bus could carry on even more devices. Communication takes place from the master (PIC) to the individual selected slave only as shown in this illustration. Configuration with PIC18F Peripheral Libraries and MPLAB Code Configurator are discussed in this article