8-bit or 16-bit mode, and the prescaling ratio

Assignment Help C/C++ Programming
Reference no: EM13165636

 8-bit or 16-bit mode, and the prescaling ratio. You can assume XTAL = 10M Hz or at the frequency you specify.

  1. Write a C program to generate a frequency of

  1. 200 Hz on PORTA pin 3. You do not have to write all the code, just specify which example(s) of the Mazidi book you modify from, with the page number. Show the new contents of Timer configuration register, Timer High (say TMR0H), Timer Low register if applicable. Also show how you calculate. (in other words, the original code may have T0CON = 0x0; and your new code may have T0CON = 0x88; the original code may show TMR0H = 0xFF; and your new code may show TMR0H = 0x ED; Explain and showhow you derive these)

  2. 200 Hz on PORTA pin 3 when a switch SW = 0 and 400 Hz on PORTA pin 4 when SW = 1 for the same switch. Assume this switch SW connects to PORTA pin 0. The code of part (b) can come from (a) with suitable modification.

  3. With 2 switches SW1 and SW2:

 

200 Hz on PORTA pin 3 when SW1 = 0, SW2= 0;

400 Hz on PORTA pin 4 when SW1 = 1, SW2 = 0;

800 HZ on PORTA pin 5 when SW1 = 0, SW2 = 1; and

1600 HZ on PORTA pin 6 when SW1 = 1, SW2 = 1.

 

Here SW1 is connected to PORTA pin 0 and SW2 is connected to PORTA pin1.

 

  1. Write a C program with a 200 Hz external clock fed into pin T1CKI (not T0CKI) to display the seconds and minutes on PORTB and PORTD. You can pick your timer as in 8 bit or 16 bit mode. Show which example can be modified from and how the code is modified.

 

 

Reference no: EM13165636

Questions Cloud

Calculate the vapor pressure at 20?C of a solution : Calculate the vapor pressure at 20?C of a solution containing 3.641 g of naphthalene in 22.7 g of chloroform (CHCl3). Naphthalene (C10H8) has a low vapor pressure and may be assumed to be nonvolatile. The vapor pressure of chloroform at 20?C is 15..
Which set of quantum numbers describes the highest energy : Which set of quantum numbers describes the highest energy electron found in the ground state of a Scandium atom?
Prepare consolidation journal entries in correct form : Compare the accounting treatment of dividends appropriated from pre-control and post control equities of a subsidiary. Consider the accounting by the companies paying and receiving the dividend, as well as by the corporate group.
How much potassium nitrate has to dissolve in water : How much potassium nitrate has to dissolve in water to absorb 110 of heat?
8-bit or 16-bit mode, and the prescaling ratio : 8-bit or 16-bit mode, and the prescaling ratio. You can assume XTAL = 10M Hz or at the frequency you specify.
Write an equation for the half-reaction : In an electrolytic cell Mn2+ is reduced to Mn and Sn is oxidized to Sn2+. Write an equation for the half-reaction occurring at the anode and at the cathode.
Calculate the number of grams of sulfuric acid present : Calculate the number of grams of sulfuric acid present in the mixture after the reaction is complete.
Determine the temperature the reaction is spontaneous : For a reaction in which delta H= -360.1 kJ/mol and delta= - 90.0 J/K*mol, determine the temperature (in *C) below which the reaction is spontaneous.
Determine the rate law and the value of k : Determine the rate law and the value of k for the reaction at 25oC

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program to crypt its input accordingly

Write a program to crypt its input according to a specified transformation scheme

  Program to tell you how many months it will take to pay off

write a program to tell you how many months it will take to pay off any loan, as well as the total amount of interest paid over the life of the loan.

  Write a bouncing ball video game

The balls bounces within the screen where the two horizontal walls are fixed

  Program that asks the user to enter the number of miles

Write a C - program that asks the user to enter the number of miles traveled and the number of gallons of gasoline consumed. It should then calculate and display the miles-per-gallon value. Confine your output to 1 decimal place.

  Struct definition to represent the data of a person''s bank

Define a struct definition to represent the data of a person's bank account. There will be one string for the name, and two doubles for balance and interest rate. Declare two variables of this new type in the main function. Modify the values of each ..

  Design a class named employeerecord

Design a class named EmployeeRecord that holds an employee's ID number, name, and payrate. Include mutator methods to set the values for each data field and output the values for each data field. Create the class diagram and write the code that

  Implement a simplified version of the set class

You will implement a simplified version of the set class. You must implement all functions defined in the provided file set.h. You may add other member functions and variables as necessary.

  Write a count occurrences() function that accepts a string

Write a CountOccurrences() function that accepts a string to be searched and a sub-string to be found. The function should return the # of times the sub-string is found. Write a tester file that declares a secret sentence as a constant.

  Implement method to advance any given date by one day

Write C++ implementation of this method. Create and specify any other methods that you require. Include comments which will be helpful to someone who will maintain implementation in the future.

  Principle ofsuperposition to determine that system is linear

Apply the principle of superposition to determine whether the following systems are linear. Sketch what the plot of the function looks like.

  Asks the user for the name of an input file and translates

Write a C++ program that asks the user for the name of an input file and translates the contents of that input file using ROT13. Your  main  function should be responsible for reading the input file and coordinating calls to a value-returning functio..

  Write a program code to compute and build a table of reynold

Write a program code to compute and build a table of Reynolds numbers at flow velocities varying from 100 to 1000 ft/sec (at increments of 100)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd