DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
B.ENG 12T ETU07421: MICROPROCESSOR APPLICATIONS. ASSIGNMENT5 GROUP SIX (6) MEMBERS. 1. OMARY M. SAID (120647472643) 2.FELIX MWAMBASHI (120647412621) 3.SITTA GEMBEGE(120647492649) 4. ASWILE NIKUSUMA(120647402611) 5.JOHNCHACHA (100602G8002) 6.BRUNO SONZOGO (100602G8317)
AIM: TO INTERFACE MULTIMEDIA MEMORY CARD(MMC) WITH MICROCONTROLLER
TOOLS/EQUIPMENTS: Display unit (LCD 16X2) PIC18F4550 Temperature sensor(LM 35) Series Real Time Clock(DS 1307) Proteus simulating software MikroC software for PIC
PROCEDURE: Circuit diagram
From the above circuit the temperature sensor is required to measure the value of temperature (in volts), when the value is measured it is converted to degrees centigrade by the microcontroller and displayed on the lcd and at the same time the value of the temperature is recorded on the multimedia memory card showing the time of recording and the value of temperature.
By using MikroC software to the write the codes for measuring the values of temperature, displaying on the lcd and recording the values and time on the multimedia memory card
Source codes used: //Memory Card Chip Select Connection sfrsbitMmc_Chip_Select at RB2_bit; sfrsbitMmc_Chip_Select_Direction at TRISB2_bit; //
// Software I2C connections sbit Soft_I2C_Scl at RB3_bit; sbit Soft_I2C_Sda at RB4_bit; sbit Soft_I2C_Scl_Direction at TRISB3_bit; sbit Soft_I2C_Sda_Direction at TRISB4_bit; // End Software I2C connections
// LCD module connections sbit LCD_RS at RD0_bit; sbit LCD_RW at RD1_bit; sbit LCD_EN at RD2_bit; sbit LCD_D4 at RD4_bit; sbit LCD_D5 at RD5_bit; sbit LCD_D6 at RD6_bit; sbit LCD_D7 at RD7_bit;
sbitLCD_RS_Direction at TRISD0_bit; sbitLCD_EN_Direction at TRISD2_bit; sbit LCD_D4_Direction at TRISD4_bit; sbit LCD_D5_Direction at TRISD5_bit; sbit LCD_D6_Direction at TRISD6_bit; sbit LCD_D7_Direction at TRISD7_bit; // End LCD module connections
SIMULATION: After loading the codes into the PIC18F4550 and simulating the circuit the output of the circuit was as shown in the figure below: OUTPUT 1:
OUTPUT 2:
CONLUSION: The laboratory task was successfully achieved because the temperature sensor measured the temperature values correctly and the values were successful recording on the multimedia memory card. The values recorded on the memory card can be viewed from the text file created during the simulation. From simulation the text file is shown below.