Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this: Using the interrupt method to write an assembly program to count number of times the free-running timer overflow (TOF is

I need help with this:

Using the interrupt method to write an assembly program to count number of times the free-running timer overflow (TOF is raised). Display the counts as a binary number using LEDs on the microcontroller training board.

Suggestions: You can brow the example program in the Unit 5 Lecture 8, and browse through the subroutine InitLEDs from an earlier lab.

Please follow the procedures of CodeWarrior Tutorial I to create a new project, and call it Lab8.mcp, replace the main.asm by the CodeWarrior Assembly Program Shell.txt, then, modify the main.asm to do the right thing.

After a successful assembly, follow the procedures of CodeWarrior Tutorial II to download your code to the controllers memory, and test your program.

This is what I have now:

;***************************************************************** ; export symbols ;***************************************************************** ;For absolute assembly: this is the application entry point ABSENTRY Main

;***************************************************************** ; Include derivative-specific definitions ;***************************************************************** ;The microcontroller chip used by Dragon12-plus2 board INCLUDE 'mc9s12dg256.inc'

;***************************************************************** ; Symbolic constant(EQU) section ;***************************************************************** DATA EQU RAMStart ;use $1000 - $1FFF for data STACK EQU RAMEnd+1 ;use $2000 - $3FFF for stack CODE EQU $4000 ;use flash ROM $4000 - $7FFF for code

;***************************************************************** ; Data section ;***************************************************************** ORG DATA

;***************************************************************** ; Main program section ;***************************************************************** ORG CODE Main:

;***************************************************************** ; Subroutine section ;***************************************************************** ;***************************************************************** ; Interrupt Vectors ;***************************************************************** ORG $FFFE DC.W Main ;Reset Vector

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions