How can I inject a constant into a directive's controller?

Can anyone please help me write this 68k assembly program?

  • You are asked to use the I/O and timer features of a PI/T controller to measure the frequency of a slowly varying external square wave signal (frequency in the range of a few KHZ). The signal occurs at line 0 of Port A of the PI/T. Develop the following 68K C-callable subroutines to implement this task. a) void SetupPITTimerAndIO (void) – This function configures the timer for frequency measurement. It also configures the PI/T to enable reading of the external signal. (5 Marks) b) unsigned long int CalculateExternalSignalHighTime(void) – This function samples the external square wave signal and uses the PI/T timer to calculate the time for which the external signal is HIGH (You only need to consider one cycle of the signal). The return value of the function is the calculated HIGH time expressed in 10-6 seconds. (8 Marks) You may make the following assumptions: • PI/T 1 is used for timing and reading the external signal. The base address of the PI/T controller is 0x41A000. • A file, called pit_registers_offsets.i, containing EQU directives for all of the PI/T registers, is available for inclusion in your source file. • The clock frequency of the 68K processor is 2 MHZ

  • Answer:

    reported

Rose at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.