SlideShare a Scribd company logo
1 | Page
Alarm Clock Design Using PIC18F45
ELEC 310
Submitted by: Maria AlKadhem
Contents
Detailed Specification: 2
Input: 2
LCD display: 2
Microcontroller: 4
Clocking Choice 5
Working theory: 5
Pin out of the device: 6
LCD interfacing: 6
Final comments: 7
Introduction:
The major purpose of the project is to get familiar with the
PIC18FXX series microcontrollers. We are ought to design an
alarm clock which will be able to display the time on an LCD as
well as we can give input through the dip switches. The dip
switches will be able to increment the hours and minutes. We
will go through the detailed design a bit later in the document.
In order to implement the alarm clock we had to make external
circuitry as well which was necessary for the following
functions.
· Input
· Buzzer
· Display at LCD.
The pith of the alarm clock is to run the clock of MCU in
counter mode. When the counter is set the MCU starts counting
till the number and then when the threshold is generated the
output signal is used to start a buzzer. At the same time there is
an LCD used in the circuit which will be responsible for
displaying the three things.
· Current time.
· Alarm time
· Remaining time.
For setting the alarm there are two DIP switches. One for
adjusting the hours and other is used for adjusting the minutes.
For clearing the alarm we simply will be pressing both at a
time. The corresponding ports of the MCU will be used in the
INPUT mode.Detailed Specification:
Let’s discuss the detailed specifications of this device.Input:
The input of the alarm clock consists of two DIP switches. One
switch will be used for adjusting the hours. The second switch
will be used for the adjustment of the minutes.
Each time a button is at high logic there will be an increase in
the corresponding variable of alarm.
When both of the buttons are pressed there will be a reset of
clock making the value to 0.0. It will be the off state of the
clock as well.LCD display:
We are using a 16x 2 display screen which is of 16 pin. The
device is TRULY LCD MODULE MTC-C162DPRN-2N. It is
capable of displaying 16 characters in 2 lines at a time. Making
overall 32 characters.
The pin Details are given below for the LCD module.
Pin NO. Symbol Level Description
1 VSS 0V Ground
2 VDD 5.0V Supply voltage for logic
3 VO --- Input voltage for LCD
4 RS H/L H : Data, L : Instruction code
5 R/W H/L H : Read mode, L : Write mode
7 DB0 H/L Data bit 0
8 DB1 H/L Data bit 1
9 DB2 H/L Data bit 2
10 DB3 H/L Data bit 3
11 DB4 H/L Data bit 4
12 DB5 H/L Data bit 5
13 DB6 H/L Data bit 6
14 DB7 H/L Data bit 7
15 NC --- No Connection
16 NC --- No Connection
The VSS is kept at ground.
Last 2 pins are not included in the design they are not used at
all.
Microcontroller:
The selected microcontroller is PIC18F452 because of the
following reasons.
This powerful 10 MIPS (100 nanosecond instruction execution)
yet easy-to-program (only 77 single word instructions) CMOS
FLASH-based 8-bit microcontroller packs Microchip's powerful
PIC® architecture into an 40- or 44-pin package and is upwards
compatible with the PIC16C5X, PIC12CXXX, PIC16CXX and
PIC17CXX devices and thus providing a seamless migration
path of software code to higher levels of hardware integration.
The PIC18F452 features a 'C' compiler friendly development
environment, 256 bytes of EEPROM, 32 K of flash memory,
1536 bytes of RAM, Self-programming, an ICD, 2
capture/compare/PWM functions, 8 channels of 10-bit Analog-
to-Digital (A/D) converter, the synchronous serial port can be
configured as either 3-wire Serial Peripheral Interface or the 2-
wire Inter-Integrated Circuit bus and Addressable Universal
Asynchronous Receiver Transmitter (AUSART).
All of these features make it ideal for manufacturing equipment,
instrumentation and monitoring, data acquisition, power
conditioning, environmental monitoring, telecom and consumer
audio/video applications. Which is why we used it to design the
alarm clock application.
Clocking Choice
We used timer 0 module for the project. The module
encompasses the following features.
The Timer0 module has the following features:
• Software selectable as an 8-bit or 16-bit timer/counter
• Readable and writable
• Dedicated 8-bit software programmable presaler
• Clock source selectable to be external or internal
• Interrupt-on-overflow from FFH to 00h in 8-bit mode and
FFFFH to 0000H in 16-bit mode
• Edge select for external clock
We will use it in software selectable timer/counter. And will be
using 8-bit mode. Which will be enough for the application.
Timer mode is selected by clearing the T0CS bit. In Timer
mode, the Timer0 module will increment every instruction
cycle. If the TMR0L register is written, the increment is
inhibited for the following two instruction cycles. The user can
work around this by writing an adjusted value to the TMR0L
register.
Counter mode is selected by setting the T0CS bit. In Counter
mode, Timer0 will increment, either on every rising or falling
edge of pin RA4/T0CKI. The incrementing edge is determined
by the timer0 source edge select bit(T0SE). Clearing the T0SE
bit selects the rising edge. Restrictions on the external clock
input are
Discussed below.
When an external clock input is used for Timer0, it must meet
certain requirements. The requirements ensure the external
clock can be synchronized with the internal phase clock
(TOSC). Also, there is a delay in the actual incrementing of
Timer0 after synchronization.
Design theory:
The detailed design of the project is given below.
Pin out of the device:
The following pins of microcontrollers are connected to the
other devices as follows.
Pin 2 and 3 to DIP switches which are simply operating in the
input mode.
Pin 6 to the buzzer in clocking mode.
Pins 24 to 34 are used as the output and are interfaced with the
LCD.LCD interfacing:
We used the TRULY LCD MODULE MTC-C162DPRN-2N for
the displaying the operation of the clock.
The pin Details are given below for the LCD module.
PIN connections:
1 VSS 0V Ground
2 VDD 5.0V Supply voltage for logic
3 VO --- Input voltage for LCD
4 RS H/L H : Data, L : Instruction code
5 R/W H/L H: Read mode, L : Write mode
7 DB0 H/L Data bit 0
8 DB1 H/L Data bit 1
9 DB2 H/L Data bit 2
10 DB3 H/L Data bit 3
11 DB4 H/L Data bit 4
12 DB5 H/L Data bit 5
13 DB6 H/L Data bit 6
14 DB7 H/L Data bit 7
15 NC --- No Connection
16 NC --- No Connection
The VSS is kept at ground.
Last 2 pins are not included in the design they are not used at
all.
The data pins which are used are simply the output in MCU.
The functions available allows us to send the data to the
display.
The pins (4-14) of the LCD are interfaced with the pins (24-26)
and (19-30) of MCU.Final comments:
The alarm clock can easily be implemented by the strategy
discussed above that is
Use the clock counter of pic18F452
Use an LCD for the display
Dip switches or even a keypad can also be used for the input.
We used DIP switches just to avoid the complexity.
SFR
Value
Description of how its programmed
Name

More Related Content

Similar to 1 PageAlarm Clock Design Using PIC18F45E.docx

Coin based mobile charger project report
Coin based mobile charger project reportCoin based mobile charger project report
Coin based mobile charger project report
kaushal chaubey
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
NIT Raipur
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
Susmit Sircar
 
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
akmalKhan55
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
Pallavi Bharti
 
Gesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docuGesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docu
Vignan Munna
 
report cs
report csreport cs
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
IOSR Journals
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
IOSR Journals
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
IOSR Journals
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
IOSR Journals
 
E010132736
E010132736E010132736
E010132736
IOSR Journals
 
embedded system
embedded systemembedded system
embedded system
Vivek Ranjan
 
project 3 full report
project 3 full reportproject 3 full report
project 3 full report
Shubham Shivhare
 
Moving message display
Moving message displayMoving message display
Moving message display
viraj1989
 
Gsm message display
Gsm message displayGsm message display
Gsm message display
dhanshri_deshmukh
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
IJERA Editor
 
Technical seminar project stalin babu m 116_f1a0471
Technical seminar project stalin babu m 116_f1a0471Technical seminar project stalin babu m 116_f1a0471
Technical seminar project stalin babu m 116_f1a0471
STALIN BABU
 
A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
Abhishekvb
 
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
VISHNU KP
 

Similar to 1 PageAlarm Clock Design Using PIC18F45E.docx (20)

Coin based mobile charger project report
Coin based mobile charger project reportCoin based mobile charger project report
Coin based mobile charger project report
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
 
Gesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docuGesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docu
 
report cs
report csreport cs
report cs
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
E010132736
E010132736E010132736
E010132736
 
embedded system
embedded systemembedded system
embedded system
 
project 3 full report
project 3 full reportproject 3 full report
project 3 full report
 
Moving message display
Moving message displayMoving message display
Moving message display
 
Gsm message display
Gsm message displayGsm message display
Gsm message display
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
 
Technical seminar project stalin babu m 116_f1a0471
Technical seminar project stalin babu m 116_f1a0471Technical seminar project stalin babu m 116_f1a0471
Technical seminar project stalin babu m 116_f1a0471
 
A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
 
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
 

More from mercysuttle

1 Question Information refinement means taking the system requi.docx
1 Question Information refinement means taking the system requi.docx1 Question Information refinement means taking the system requi.docx
1 Question Information refinement means taking the system requi.docx
mercysuttle
 
1 pageApaSourcesDiscuss how an organization’s marketing i.docx
1 pageApaSourcesDiscuss how an organization’s marketing i.docx1 pageApaSourcesDiscuss how an organization’s marketing i.docx
1 pageApaSourcesDiscuss how an organization’s marketing i.docx
mercysuttle
 
1 R120V11Vac0Vdc R2100VC13mE.docx
1 R120V11Vac0Vdc R2100VC13mE.docx1 R120V11Vac0Vdc R2100VC13mE.docx
1 R120V11Vac0Vdc R2100VC13mE.docx
mercysuttle
 
1 PSYC499SeniorCapstoneTheImpactoftheSocial.docx
1 PSYC499SeniorCapstoneTheImpactoftheSocial.docx1 PSYC499SeniorCapstoneTheImpactoftheSocial.docx
1 PSYC499SeniorCapstoneTheImpactoftheSocial.docx
mercysuttle
 
1 Politicking is less likely in organizations that have· adecl.docx
1 Politicking is less likely in organizations that have· adecl.docx1 Politicking is less likely in organizations that have· adecl.docx
1 Politicking is less likely in organizations that have· adecl.docx
mercysuttle
 
1 page2 sourcesReflect on the important performance management.docx
1 page2 sourcesReflect on the important performance management.docx1 page2 sourcesReflect on the important performance management.docx
1 page2 sourcesReflect on the important performance management.docx
mercysuttle
 
1 of 402.5 PointsUse Cramer’s Rule to solve the following syst.docx
1 of 402.5 PointsUse Cramer’s Rule to solve the following syst.docx1 of 402.5 PointsUse Cramer’s Rule to solve the following syst.docx
1 of 402.5 PointsUse Cramer’s Rule to solve the following syst.docx
mercysuttle
 
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
mercysuttle
 
1 Objectives Genetically transform bacteria with for.docx
1 Objectives Genetically transform bacteria with for.docx1 Objectives Genetically transform bacteria with for.docx
1 Objectives Genetically transform bacteria with for.docx
mercysuttle
 
1 of 8 Student name ……………. St.docx
1 of 8 Student name …………….               St.docx1 of 8 Student name …………….               St.docx
1 of 8 Student name ……………. St.docx
mercysuttle
 
1 MATH 106 QUIZ 4 Due b.docx
1 MATH 106 QUIZ 4                                 Due b.docx1 MATH 106 QUIZ 4                                 Due b.docx
1 MATH 106 QUIZ 4 Due b.docx
mercysuttle
 
1 MN6003 Levis Strauss Case Adapted from Does Levi St.docx
1 MN6003 Levis Strauss Case Adapted from Does Levi St.docx1 MN6003 Levis Strauss Case Adapted from Does Levi St.docx
1 MN6003 Levis Strauss Case Adapted from Does Levi St.docx
mercysuttle
 
1 NAME__________________ EXAM 1 Directi.docx
1 NAME__________________ EXAM 1  Directi.docx1 NAME__________________ EXAM 1  Directi.docx
1 NAME__________________ EXAM 1 Directi.docx
mercysuttle
 
1 Name .docx
1 Name                                                 .docx1 Name                                                 .docx
1 Name .docx
mercysuttle
 
1 pageapasources2Third Party LogisticsBriefly describe .docx
1 pageapasources2Third Party LogisticsBriefly describe .docx1 pageapasources2Third Party LogisticsBriefly describe .docx
1 pageapasources2Third Party LogisticsBriefly describe .docx
mercysuttle
 
1 Pageapasources2Review the Food Environment Atlas maps for.docx
1 Pageapasources2Review the Food Environment Atlas maps for.docx1 Pageapasources2Review the Food Environment Atlas maps for.docx
1 Pageapasources2Review the Food Environment Atlas maps for.docx
mercysuttle
 
1 Lab 3 Newton’s Second Law of Motion Introducti.docx
1 Lab 3 Newton’s Second Law of Motion  Introducti.docx1 Lab 3 Newton’s Second Law of Motion  Introducti.docx
1 Lab 3 Newton’s Second Law of Motion Introducti.docx
mercysuttle
 
1 Marks 2 A person can be prosecuted for both an attempt and .docx
1 Marks 2 A person can be prosecuted for both an attempt and .docx1 Marks 2 A person can be prosecuted for both an attempt and .docx
1 Marks 2 A person can be prosecuted for both an attempt and .docx
mercysuttle
 
1 Marks 1 Post Traumatic Stress Disorder (PTSD)Choose one .docx
1 Marks 1 Post Traumatic Stress Disorder (PTSD)Choose one .docx1 Marks 1 Post Traumatic Stress Disorder (PTSD)Choose one .docx
1 Marks 1 Post Traumatic Stress Disorder (PTSD)Choose one .docx
mercysuttle
 
1 List of Acceptable Primary Resources for the Week 3 .docx
1 List of Acceptable Primary Resources for the Week 3 .docx1 List of Acceptable Primary Resources for the Week 3 .docx
1 List of Acceptable Primary Resources for the Week 3 .docx
mercysuttle
 

More from mercysuttle (20)

1 Question Information refinement means taking the system requi.docx
1 Question Information refinement means taking the system requi.docx1 Question Information refinement means taking the system requi.docx
1 Question Information refinement means taking the system requi.docx
 
1 pageApaSourcesDiscuss how an organization’s marketing i.docx
1 pageApaSourcesDiscuss how an organization’s marketing i.docx1 pageApaSourcesDiscuss how an organization’s marketing i.docx
1 pageApaSourcesDiscuss how an organization’s marketing i.docx
 
1 R120V11Vac0Vdc R2100VC13mE.docx
1 R120V11Vac0Vdc R2100VC13mE.docx1 R120V11Vac0Vdc R2100VC13mE.docx
1 R120V11Vac0Vdc R2100VC13mE.docx
 
1 PSYC499SeniorCapstoneTheImpactoftheSocial.docx
1 PSYC499SeniorCapstoneTheImpactoftheSocial.docx1 PSYC499SeniorCapstoneTheImpactoftheSocial.docx
1 PSYC499SeniorCapstoneTheImpactoftheSocial.docx
 
1 Politicking is less likely in organizations that have· adecl.docx
1 Politicking is less likely in organizations that have· adecl.docx1 Politicking is less likely in organizations that have· adecl.docx
1 Politicking is less likely in organizations that have· adecl.docx
 
1 page2 sourcesReflect on the important performance management.docx
1 page2 sourcesReflect on the important performance management.docx1 page2 sourcesReflect on the important performance management.docx
1 page2 sourcesReflect on the important performance management.docx
 
1 of 402.5 PointsUse Cramer’s Rule to solve the following syst.docx
1 of 402.5 PointsUse Cramer’s Rule to solve the following syst.docx1 of 402.5 PointsUse Cramer’s Rule to solve the following syst.docx
1 of 402.5 PointsUse Cramer’s Rule to solve the following syst.docx
 
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
 
1 Objectives Genetically transform bacteria with for.docx
1 Objectives Genetically transform bacteria with for.docx1 Objectives Genetically transform bacteria with for.docx
1 Objectives Genetically transform bacteria with for.docx
 
1 of 8 Student name ……………. St.docx
1 of 8 Student name …………….               St.docx1 of 8 Student name …………….               St.docx
1 of 8 Student name ……………. St.docx
 
1 MATH 106 QUIZ 4 Due b.docx
1 MATH 106 QUIZ 4                                 Due b.docx1 MATH 106 QUIZ 4                                 Due b.docx
1 MATH 106 QUIZ 4 Due b.docx
 
1 MN6003 Levis Strauss Case Adapted from Does Levi St.docx
1 MN6003 Levis Strauss Case Adapted from Does Levi St.docx1 MN6003 Levis Strauss Case Adapted from Does Levi St.docx
1 MN6003 Levis Strauss Case Adapted from Does Levi St.docx
 
1 NAME__________________ EXAM 1 Directi.docx
1 NAME__________________ EXAM 1  Directi.docx1 NAME__________________ EXAM 1  Directi.docx
1 NAME__________________ EXAM 1 Directi.docx
 
1 Name .docx
1 Name                                                 .docx1 Name                                                 .docx
1 Name .docx
 
1 pageapasources2Third Party LogisticsBriefly describe .docx
1 pageapasources2Third Party LogisticsBriefly describe .docx1 pageapasources2Third Party LogisticsBriefly describe .docx
1 pageapasources2Third Party LogisticsBriefly describe .docx
 
1 Pageapasources2Review the Food Environment Atlas maps for.docx
1 Pageapasources2Review the Food Environment Atlas maps for.docx1 Pageapasources2Review the Food Environment Atlas maps for.docx
1 Pageapasources2Review the Food Environment Atlas maps for.docx
 
1 Lab 3 Newton’s Second Law of Motion Introducti.docx
1 Lab 3 Newton’s Second Law of Motion  Introducti.docx1 Lab 3 Newton’s Second Law of Motion  Introducti.docx
1 Lab 3 Newton’s Second Law of Motion Introducti.docx
 
1 Marks 2 A person can be prosecuted for both an attempt and .docx
1 Marks 2 A person can be prosecuted for both an attempt and .docx1 Marks 2 A person can be prosecuted for both an attempt and .docx
1 Marks 2 A person can be prosecuted for both an attempt and .docx
 
1 Marks 1 Post Traumatic Stress Disorder (PTSD)Choose one .docx
1 Marks 1 Post Traumatic Stress Disorder (PTSD)Choose one .docx1 Marks 1 Post Traumatic Stress Disorder (PTSD)Choose one .docx
1 Marks 1 Post Traumatic Stress Disorder (PTSD)Choose one .docx
 
1 List of Acceptable Primary Resources for the Week 3 .docx
1 List of Acceptable Primary Resources for the Week 3 .docx1 List of Acceptable Primary Resources for the Week 3 .docx
1 List of Acceptable Primary Resources for the Week 3 .docx
 

Recently uploaded

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
spdendr
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
Chevonnese Chevers Whyte, MBA, B.Sc.
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 

Recently uploaded (20)

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 

1 PageAlarm Clock Design Using PIC18F45E.docx

  • 1. 1 | Page Alarm Clock Design Using PIC18F45 ELEC 310 Submitted by: Maria AlKadhem Contents Detailed Specification: 2 Input: 2 LCD display: 2
  • 2. Microcontroller: 4 Clocking Choice 5 Working theory: 5 Pin out of the device: 6 LCD interfacing: 6 Final comments: 7 Introduction: The major purpose of the project is to get familiar with the PIC18FXX series microcontrollers. We are ought to design an alarm clock which will be able to display the time on an LCD as well as we can give input through the dip switches. The dip switches will be able to increment the hours and minutes. We will go through the detailed design a bit later in the document. In order to implement the alarm clock we had to make external circuitry as well which was necessary for the following functions. · Input · Buzzer · Display at LCD. The pith of the alarm clock is to run the clock of MCU in counter mode. When the counter is set the MCU starts counting till the number and then when the threshold is generated the output signal is used to start a buzzer. At the same time there is an LCD used in the circuit which will be responsible for displaying the three things. · Current time. · Alarm time · Remaining time. For setting the alarm there are two DIP switches. One for adjusting the hours and other is used for adjusting the minutes. For clearing the alarm we simply will be pressing both at a time. The corresponding ports of the MCU will be used in the INPUT mode.Detailed Specification: Let’s discuss the detailed specifications of this device.Input:
  • 3. The input of the alarm clock consists of two DIP switches. One switch will be used for adjusting the hours. The second switch will be used for the adjustment of the minutes. Each time a button is at high logic there will be an increase in the corresponding variable of alarm. When both of the buttons are pressed there will be a reset of clock making the value to 0.0. It will be the off state of the clock as well.LCD display: We are using a 16x 2 display screen which is of 16 pin. The device is TRULY LCD MODULE MTC-C162DPRN-2N. It is capable of displaying 16 characters in 2 lines at a time. Making overall 32 characters. The pin Details are given below for the LCD module. Pin NO. Symbol Level Description 1 VSS 0V Ground 2 VDD 5.0V Supply voltage for logic 3 VO --- Input voltage for LCD 4 RS H/L H : Data, L : Instruction code 5 R/W H/L H : Read mode, L : Write mode 7 DB0 H/L Data bit 0 8 DB1 H/L Data bit 1 9 DB2 H/L Data bit 2 10 DB3 H/L Data bit 3 11 DB4 H/L Data bit 4 12 DB5 H/L Data bit 5 13 DB6 H/L Data bit 6 14 DB7 H/L Data bit 7 15 NC --- No Connection 16 NC --- No Connection The VSS is kept at ground. Last 2 pins are not included in the design they are not used at all.
  • 4. Microcontroller: The selected microcontroller is PIC18F452 because of the following reasons. This powerful 10 MIPS (100 nanosecond instruction execution) yet easy-to-program (only 77 single word instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC® architecture into an 40- or 44-pin package and is upwards compatible with the PIC16C5X, PIC12CXXX, PIC16CXX and PIC17CXX devices and thus providing a seamless migration path of software code to higher levels of hardware integration. The PIC18F452 features a 'C' compiler friendly development environment, 256 bytes of EEPROM, 32 K of flash memory, 1536 bytes of RAM, Self-programming, an ICD, 2 capture/compare/PWM functions, 8 channels of 10-bit Analog- to-Digital (A/D) converter, the synchronous serial port can be configured as either 3-wire Serial Peripheral Interface or the 2- wire Inter-Integrated Circuit bus and Addressable Universal Asynchronous Receiver Transmitter (AUSART). All of these features make it ideal for manufacturing equipment, instrumentation and monitoring, data acquisition, power conditioning, environmental monitoring, telecom and consumer audio/video applications. Which is why we used it to design the alarm clock application. Clocking Choice We used timer 0 module for the project. The module encompasses the following features. The Timer0 module has the following features: • Software selectable as an 8-bit or 16-bit timer/counter • Readable and writable • Dedicated 8-bit software programmable presaler • Clock source selectable to be external or internal • Interrupt-on-overflow from FFH to 00h in 8-bit mode and
  • 5. FFFFH to 0000H in 16-bit mode • Edge select for external clock We will use it in software selectable timer/counter. And will be using 8-bit mode. Which will be enough for the application. Timer mode is selected by clearing the T0CS bit. In Timer mode, the Timer0 module will increment every instruction cycle. If the TMR0L register is written, the increment is inhibited for the following two instruction cycles. The user can work around this by writing an adjusted value to the TMR0L register. Counter mode is selected by setting the T0CS bit. In Counter mode, Timer0 will increment, either on every rising or falling edge of pin RA4/T0CKI. The incrementing edge is determined by the timer0 source edge select bit(T0SE). Clearing the T0SE bit selects the rising edge. Restrictions on the external clock input are Discussed below. When an external clock input is used for Timer0, it must meet certain requirements. The requirements ensure the external clock can be synchronized with the internal phase clock (TOSC). Also, there is a delay in the actual incrementing of Timer0 after synchronization. Design theory: The detailed design of the project is given below. Pin out of the device: The following pins of microcontrollers are connected to the other devices as follows. Pin 2 and 3 to DIP switches which are simply operating in the input mode. Pin 6 to the buzzer in clocking mode. Pins 24 to 34 are used as the output and are interfaced with the LCD.LCD interfacing: We used the TRULY LCD MODULE MTC-C162DPRN-2N for
  • 6. the displaying the operation of the clock. The pin Details are given below for the LCD module. PIN connections: 1 VSS 0V Ground 2 VDD 5.0V Supply voltage for logic 3 VO --- Input voltage for LCD 4 RS H/L H : Data, L : Instruction code 5 R/W H/L H: Read mode, L : Write mode 7 DB0 H/L Data bit 0 8 DB1 H/L Data bit 1 9 DB2 H/L Data bit 2 10 DB3 H/L Data bit 3 11 DB4 H/L Data bit 4 12 DB5 H/L Data bit 5 13 DB6 H/L Data bit 6 14 DB7 H/L Data bit 7 15 NC --- No Connection 16 NC --- No Connection The VSS is kept at ground. Last 2 pins are not included in the design they are not used at all. The data pins which are used are simply the output in MCU. The functions available allows us to send the data to the display. The pins (4-14) of the LCD are interfaced with the pins (24-26) and (19-30) of MCU.Final comments: The alarm clock can easily be implemented by the strategy discussed above that is Use the clock counter of pic18F452 Use an LCD for the display Dip switches or even a keypad can also be used for the input.
  • 7. We used DIP switches just to avoid the complexity. SFR Value Description of how its programmed Name