DEPARTMENT OF INFORMATION AND COMMUNICATION TECHNOLOGY
SESSION DECEMBER 2016
MINI
PROJECT REPORT
DEC5052
EMBEDDED SYSTEM APPLICATION
“SEVEN
SEGMENT TEMPERATURE”
Prepared for:
DR HJ HASNIM BIN
HARUN
LECTURER of EMBEDDED
SYSTEM APPLICATION JTMK
Prepared by:
NAMA PELAJAR
|
NOMBOR PENDAFTARAN
|
KELAS
|
Kosigan A/L Vadivelu
|
01DIP14F2044
|
EMSB
|
Muhammad Danish bin
Rasali
|
01DIP14F2045
|
EMSB
|
Karthik a/l Veerakumar
|
01DNS15F1081
|
EMSB
|
|
|
|
|
|
|
Date: 22/03/2017
TABLE OF CONTENTS
BIL
|
TOPIC
|
PAGES
|
1.
|
1.0 INTRODUCTION
|
3
|
2.
|
2.0 DESIGN OF THE PROJECT
|
4
|
3.
|
3.0 DEVELOPMENT
3.1 HARDWARE, SOFTWARE REQUIREMENT and COST
3.2 PROGRAMMING THE PIC
|
5 - 8
|
4.
|
4.1 ISSUES DURING PROJECT
IMPLEMENTATION
4.2 INPUT WHOLE
LEARNING
|
9
|
5.
|
5.0 CONCLUSION
|
9
|
1.0 INTRODUCTION
Ultimately we chose the seven
segment temperature in the development of mini projects. Seven Segment Temperature is a project that
displays the temperature reading from the sensor LM35 to seven segment.
We can see the circuit for a
temperature sensor using LM35 and temperature.
Accordingly the temperature monitor is printed on LM35 series. Here we design a circuit where the temperature
will be printed in five digit common cathode seven segment display. The project involves the detection of hot or
cold temperature readings such as water and air.
In summary this project involves a
process in which an input where sensor is put something hot or cold objects and
the output will produce a reading of the temperature of the items on the LCD
will be displayed.
2.0 DESIGN
OF THE PROJECT
3.0 DEVELOPMENT
3.1 HARDWARE, SOFTWARE REQUIPMENT and
COST
3.2 PROGRAMMING (CODING)
/*
Project:
Seven Segment Temperature
Programmer:
Danish,Kosigan,Karthik
Microcontroller
(Crystal Frequency):
PIC16F877A
(20MHz), PIC16F887 (20MHz), PIC16F1939 (Internal 32MHz)
PIC18F4520
(10MHz), PIC18F4550 (10MHz), PIC18F46K22 (Internal 16MHz)
Compiler:
XC8 v1.35
*/
#define TIMER0
#define
ADC
#define
PB1 PORTAbits.RA0
#define
PB2 PORTAbits.RA1
#define
PB3 PORTAbits.RA2
#define
PB4 PORTAbits.RA3
#if
defined (_16F877A) || (_16F887)
#define SEGMENT PORTB //abcdefg.
#define DIGIT PORTD
#elif
defined (_16F1939) || (_18F4520) || (_18F4550) || (_18F46K22)
#define SEGMENT LATB //abcdefg.
#define DIGIT LATD
#endif
#define
PULSE0 200
#define
PULSE1 10000
#define ZAIM
#include
"LibraryHardware.h"
#include
"LibraryPeripheral.h"
#include
"LibraryMath.h"
static
const char segment[]={
0b11111100,0b01100000,0b11011010,0b11110010,0b01100110,
0b10110110,0b10111110,0b11100000,0b11111110,0b11110110,
};
char
count,digit[8];
unsigned
int temperature;
static
void interrupt isr(void)
{
if(TMR0IF==1){
TMR0IF=0;
TMR0=6;
if(count<7) count++;
else count=0;
DIGIT=0;
SEGMENT=digit[count];
DIGIT=0b00000001<<count;
}
}
void
setup()
{
initialize();
TRISA=0b00101111;
TRISB=0b00000000;
TRISC=0b00000000;
TRISD=0b00000000;
TRISE=0b00000000;
adc_init(4);
timer0(0);
enable_tmr0();
}
void
loop()
{
temperature=map(adc_read(4),0,1023,0,5000);
//10mV/deg C
digit[0]=0;
digit[1]=0b10011100;
digit[2]=0b11000110;
digit[3]=segment[temperature%10];
digit[4]=segment[(temperature/10)%10]|1;
digit[5]=segment[(temperature/100)%10];
digit[6]=0;
digit[7]=0;
delay(200);
4.0 DISCUSSION
4.1 ISSUES DURING PROJECT IMPLEMENTATION
i.
Requires
power supply to ensure the success of the encoding process & recorded
temperature value.
ii.
The
temperature of an input entered is not permanent and require a conducive
environment while noting the temperature.
iii.
To
ensure the continuity of an equipment to connect one another is right and
prudent to ensure the experiment goes well.
iv.
There
was a coding error cannot be on the road (run) and the error can be identified.
4.2 INPUT WHOLE LEARNING
i.
We
can learn about the uses of materials contained in the 7-segment this
temperature.
ii.
We
can see how the process occurs.
iii.
Next
we evaluate and record the temperature.
5.0 CONCLUSION
In
conclusion we can learn a little about how to produce 7-segment
temperature. We thank the lecturers who
helped to produce this work.
No comments:
Post a Comment