Microcontrollers and Interface Programming (CSCT6102)

Computer Science - COS

Semester: First Semester

Level: 400

Year: 2014

1 /3
HTTTC Bambili Computer Science Department
FINAL EXAM
Level 500
CSC 511: PIC MICROCONTROLLER PROJECTS
2013-2014 academic year
Duration: 2 hours
Exercise 1: First project
This is a program managing a project, written in Proton Basic environment.
Device 16F877
Symbol On_Off1 PORTB.0
Symbol On_Off2 PORTB.4
Output PORTC
Output PORTA
Input PORTB.0
Input PORTB.4
BEGIN:
If On_Off1=1 Then
PORTC=1
DelayMS 100
PORTC=0
DelayMS 100
End If
If On_Off2=1 Then
PORTA=1
DelayMS 100
PORTA=0
DelayMS 100
End If
GoTo BEGIN
1) What programming software has been used to type this program?
2) When the program is written in that software. How can we come up with the *.hex file?
3) Now that we have the *.hex file, how can we flash it in a PIC16F877 using ISIS Proteus simulation
software?
4) The program is now well working in ISIS software. Describe how the *.hex file could be flash in
reality in a PIC16F877 bought at Bamenda central market? What software can you use?
5) List at least 3 memories that we can fine in a PIC16F877
6) Choose from those memories the one that store the *.h file
7) Choose again the memory that store data when the program is running.
8) Translate this program in Mikro C environment.
9) A student suggests the circuit below. Complete this circuit (Figure 1) so that it can master the above
program.
Exercise 2: Second project
A text based LCD LM016L is connected to a microcontroller PIC16F877.
1. What mean PIC
2. Give the signification of F and 877
3. Complete the bloc diagram below (Figure 2), suggested by a student.
www.schoolfaqs.net
2 /3
4. Let us assume that a LCD port called dad1 is connected to PIC16F877 port RC0. The instructions to
be used are: “Sbit LCD_dad1 at RC0_bit;” and “Sbit LCD_dad1_Direction at TrisC0_bit;”. Write an
appropriate Mikro C program for the functioning of question 3 block diagram.
Exercise 3: Project 3.
A refrigerator can use a microcontroller to control the temperature detected by a sensor. If the
temperature is higher than a fixed value, the heater moves heat and a diode light is always shining. It this
temperature is less than the fixed value, the refrigerator sleeps.
1) Suggest a bloc diagram for this refrigerator.
2) Suggest a future refrigerator block diagram with “Welcome” and “Goodbye” messages displaying
when the refrigerator functions.
www.schoolfaqs.net
3 /3
Figure 1
Figure 2
Enset Bambili
www.schoolfaqs.net