1. Led Glowing (2)
1. Led Glowing (2)
Lab
(ECN14104)
Objective: To install and configure mikroC software, FLASH programmer and its
drivers and understand some LED controls of 8051.
Theory:
file .
• FLASH programmer
o From the same site install the zip file for FLASH software o
• USB Drivers
o Install the zip file for the drivers from the same site, extract it run the .exe file to open the
installation dialog box to install the drivers.
• Use the USB cable to connect to the Easy 8051 v6 development system to your PC and turn on the
POWER SUPPLY switch to ON position.
• Two LEDs referred to as POWER and USB LINK will illuminate to indicate that your development
system is ready to use
• Use the on-board 8051(mikroC) programmer and 8051 flash program to dump a code into the
microcontroller and empty the board to test and develop your project.
2.8051 microcontroller :
• It is an 8-bit microcontroller with 4 KB of ROM, 128 bytes of RAM, four 8- bit I/O ports, two 16-bit
timers, and a serial interface.
• It is based on the Harvard architecture, which means it has separate program and data memory34.
• It is a CISC (Complex Instruction Set Computer) microcontroller, which means it has a large number
of instructions and addressing modes.
• It is widely used in embedded systems, such as automation, medical devices, touch screens, etc.
• It has a serial interface that allows communication with other devices such as computers, modems,
printers, etc.
• The 8051 microcontroller has a built-in oscillator circuit that can be connected to an external
crystal or a ceramic resonator.
• The 8051 microcontroller has a special function register (SFR) area that contains various control
and status registers.
* NOTES:
*/
void main() {
do {
• Click on the build and program (ctrl + F11) to generate the .hex file
• A FLASH programmer dialog box will appear.
• Select the device frequency as 10MHz and click on write to load the program in
microcontroller.
Observation:
char counter;
void wait() {
Delay_ms(5000);
void main() {
while (1) {
P0 |= 1 << counter;
P1 |= 1 << counter;
P2 |= 1 << counter;
P3 |= 1 << counter;
wait();
counter = 0;
wait();
counter++;
Observation:
Result: