Essay Writer » Essay Blog » Computer Science Essays Help » Developing Delay in a PIC16F84A based System

Developing Delay in a PIC16F84A based System

Developing Delay in a PIC16F84A based System

 

  1. OBJECTIVES

 

The objectives of this experiment are

 

  • To understand the execution timing of an assembly language instruction of PIC16F84A microcontrollers.

 

  • To develop a procedure to cause a pre-determine delay for a PIC16F84A based system.

 

  • To utilized the stopwatch simulation tool of MPLAB for testing and verification of a timing program.

 

  1. BACKGROUND INFORMATION

 

Execution Timings

 

PIC16F84A is a high performance, 8-bit, single-chip microcontroller. In this Microcontroller, an instruction cycle isequal to 4 clock cycle. If you are using a Resonator Frequency of 20Mhz (the one used on the PIC trainer board), then, each Instruction cycle will be 0.2μs long.

 

 

It takes one instruction cycle to execute an instruction in PIC16F84A, except for branching.  If jump occurs, then it takes two clock cycles.

 

III. PRELAB PREPARATION

 

In the “Pre-Lab” section of your lab report include the following:

  • Find number of cycles for the execution of the following instructions:

 

INSTRUCTION                               CLOCK CYCLE

  • Find the execution time for the above program if the clock frequency is 20Mhz

 

  1. PROBLEM STATEMENT

 

Develop subroutines that cause one millisecond and one second delay.

 

  1. PROCEDURE

 

  1. Write the instruction sets that will cause one millisecond delay
  2. Develop an Excel spread file to verify your calculation for the above instruction set
  3. Develop a subroutine to cause one millisecond delay
  4. Develop a subroutine that causes one second delay
  5. Develop a subroutine that causes multiple second delays.
  6. Draw flowcharts for the above subroutines

 

Last Updated on April 2, 2019

Don`t copy text!
Scroll to Top