Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this assignment: I am using CodeWarrior Use the polling method to write an assembly program to count the number of times

I need help with this assignment:

I am using CodeWarrior

Use the polling method to write an assembly program to count the 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 refer to the example program in the Unit 4 Lecture 7 and subroutine InitLEDs from an earlier lab assignment. But, you must understand every line of code.

I have this code so far:

;File Name:

;Date:

;Purpose:

;Procedure: ; ;

;Test: ; ;

;***************************************************************** ; 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: LDS #STACK

;***************************************************************** ; 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 with AI-Powered 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

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago