Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LAB5 Using the 8051 Counters in polling mode Overview The purpose of this lab is to control and program the MC8051 Counters of the micro-controller

LAB5 Using the 8051 Counters in polling mode

Overview

The purpose of this lab is to control and program the MC8051 Counters of the micro-controller in a given sequence. The program displays current count of Counter 0 on port 1 (P1) and Counter 1on port 2 (P2). The initial P1 value is F0H and is E1H for port P2. Display update takes place on every counters initiated clock pulse. Counter0 and Counter1 are programmed in mode 2 using the polling mode, no interrupts. The status of TF0 and TF1 are displayed on Port 3 bit 0 (P3.0) and bit 1 (P3.1) respectively.

Steps

1. First, configure and initialize the required parallel ports; Counter 0 to mode 2, and Counter1 to mode 2. The Main program startsat code memory address 40H, The main program only function is updating P1 & P2and displaying the two overflow flags on port 3.
2. Second, in the main program configure the two Counters for Mode 2 with the given initial two counts. Start Counterr0, initiate the external clock pulses on your Keil simulator, and display its accumulated count value on P1. Continue updating port P1 and the status of TF0 on P3.0. Do the same for Counter1 after Counter0 overflows.
3. Third, configure the debugger display to include the Timer0, Timer1, P1, P2, P3, and the Clock Control windows. Make sure that the Timers windows are configured for no external interrupts and external pin clocks. The clock window can be used to control the CPU clock speed, which can help during the debugging process.
4. Run the program and monitor all displayed windows. Verify the operation of the two Counters, TF0 & TF1, and the three display ports.
5. Test and debug your program. Also document and submit your final report along with the well documented list file. You can slow the Counters and Ports update by controlling the MC clock using the clock window in the PREPHERALS selection.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions

Question

Distinguish between supervised and unsupervised learning models.

Answered: 1 week ago