Lab1 Microp
Lab1 Microp
Lab1 Microp
INTRODUCTION
A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a
single integrated circuit containing a processor core, memory, and programmable input/output
peripherals. Program memory in the form of NOR flash or OTP ROM is also often included
on chip, as well as a typically small amount of RAM. Microcontrollers are designed for
embedded applications, in contrast to the microprocessors used in personal computers or other
general purpose applications.
Microcontrollers are used in automatically controlled products and devices, such as
automobile engine control systems, implantable medical devices, remote controls, office
machines, appliances, power tools, and toys. By reducing the size and cost compared to a
design that uses a separate microprocessor, memory, and input/output devices,
microcontrollers make it economical to digitally control even more devices and processes.
Mixed signal microcontrollers are common, integrating analog components needed to control
non-digital electronic systems.
Effective handling of the traffic in modern towns is impossible without the application
of microprocessor equipment in the control systems, which allows one to realize complex
functional programmable control of facilities. The application of microprocessors increases
essentially the flexibility and reliability of the control system and also decreases expenses
connected with its manufacturing and exploitation. The described microprocessor system
represents a universal device with the correspondent software and can be also used for the
various technological processes control.
OBJECTIVE
• Text editor
• Switches SW2/4
• Switch/ADC – switch
• Remainder – OFF
Page | 1
LAB 1 : LEB 40503-MICROPROCESSOR
FLOW CHART
Initialize
Set Table Base
No. of Entries
Increment table
pointer
PROCEDURE
1. Enter the following program.
Page | 2
LAB 1 : LEB 40503-MICROPROCESSOR
Using the cross assembler and type X68K (filename.ASM) to create the output
(filename.OBJ).
Page | 3
LAB 1 : LEB 40503-MICROPROCESSOR
Page | 4
LAB 1 : LEB 40503-MICROPROCESSOR
QUESTION 1
Using the other yellow LED’s (bits 0 and 4) to represent pedestrian crossings (LED’s on,
when it is safe to cross, and flash during last 5 seconds), generate a new table similar to above
program to include a pedestrian facility.
Procedure
a) Enter the program to note pad and save as (.ASM) at sample folder.
b) Using the cross assembler and type X68K (filename.ASM) to create the output
(filename.OBJ).
Page | 5
LAB 1 : LEB 40503-MICROPROCESSOR
Page | 6
LAB 1 : LEB 40503-MICROPROCESSOR
RESULT
Red Yellow Green Yellow Red Yellow Green Yellow Delay Hexa.
(pedestrian) (pedestrian) value
7 6 5 4 3 2 1 0 - -
1 0 0 1 0 0 1 0 5sec 92
1 0 0 0 1 1 0 0 1sec 8C
1 0 0 1 1 1 0 0 1sec 9C
1 0 0 0 1 1 0 0 1sec 8C
1 0 0 1 1 1 0 0 1sec 9C
1 0 0 0 1 1 0 0 1sec 8C
1 0 0 0 1 0 0 0 2sec 88
0 0 1 0 1 0 0 1 5sec 29
1 1 0 0 1 0 0 0 1sec C8
1 1 0 0 1 0 0 1 1sec C9
1 1 0 0 1 0 0 0 1sec C8
1 1 0 0 1 0 0 1 1sec C9
1 1 0 0 1 0 0 0 1sec C8
1 0 0 0 1 0 0 0 2sec 88
Page | 7
LAB 1 : LEB 40503-MICROPROCESSOR
Page | 8
LAB 1 : LEB 40503-MICROPROCESSOR
Page | 9
LAB 1 : LEB 40503-MICROPROCESSOR
DISCUSSION
The first problem we facing are the cable connect from Motorola 68K board to
computer cannot be detect. After checking, troubleshooting, and installing the socket, finally
the computer detect it and software can compile and execute the program. Second problem
was we confuse to manage the system of the traffic light, condition when pedestrian walk,
condition on car moving and stop and emergency light during standby mode. After discussing
with lecturer and friend, we come out with a table which show the sequence of the traffic light
from starting to the ending of the traffic light system.
Page | 10
LAB 1 : LEB 40503-MICROPROCESSOR
CONCLUSSION
As a conclusion, the objective of task was achieved and has been successfully
presented a functional and low cost microcontroller-based traffic light system for road
intersection control. The traffic light system is designed using of Easy68k program. Besides
that, I learn to control the sequence of lights and how long each sequence is required for the
traffic light. I also understand the programming system, the function of original, initial,
motion, delay and etc. The resulting output is fed as input to the microcontroller system for
traffic light control system on real-time data.
Page | 11