Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Embedded Microcontroller Practical Exercise 1 Aim To expand on the MPLAB PIC 1 6 F 8 4 Tutorial and practice Assembly programming and Simulation. Student

Embedded Microcontroller Practical Exercise 1
Aim
To expand on the MPLAB PIC16F84 Tutorial and practice Assembly programming and Simulation.
Student Software Required
MPLAB IDE (Ver 8.92) on your PC or on the Remote Lab Server
Screen Capture software such as ScreenHunter
Task
The exercise is to modify the code you were given for MPLAB Tutorial to complete the following task:
Write a 1 to bit 0 of PORTB then wait about 5 seconds before turning off bit 0 and turning on bit1.
Continue in this way, waiting about 5 seconds after each change and when bit7 has been turned off.
then turn bit 1 on and repeat this pattern indefinitely.
Hint: Look at using the RLF (Rotate left f through Carry) command.
Method
Part 1- Program Development on your PC.
Run your PC or connect to the Remote Lab via Electromeet in the usual manner.
Locate and run the MPLAB IDE, (on your PC or on Remote Lab 8 on the Server) then follow the steps provided in the attached help file DBE_DBEEMC606_Practical_Help. The code you are provided with contains all but two instructions to complete the task. The missing instructions are one that uses RLF (Rotate Left f Through Carry) and one that uses BTFSC (Bit Test Skip if Clear).
Write the code to carry out the above task then Build the project and test it using the Simulator in the same way as for the Tutorial.
Set up a Watch to observe PORTB to see whether the code is executing correctly.
Once the code is operating to your satisfaction, take a screenshot of your program listing and attach it as SCREENSHOT 1 below. (4 marks)
Take a take a screenshot of your Watch Window showing the value of PORTB as 4 and attach it as SCREENSHOT 2 below. (4 marks)
Now close down MPLAB and log off the server without saving any changes.

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_2

Step: 3

blur-text-image_3

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions