Question

In: Electrical Engineering

HSC12 Microcontroller To create a delay using the Output Compare Channel 6, we add a number...

HSC12 Microcontroller

To create a delay using the Output Compare Channel 6, we add a number of cycles (CCOUNT)to TC6 and then wait until TCNT is equal to TC6. This happens when TLFG1(6) =1. Assuming an E-clock of 24 MHz: Complete the following table in order to generate the given delays:

CCOUNT

Prescaler

Delay

1 us

100 us

500 us

2 ms

80 ms

300ms

Solutions

Expert Solution

Timer advances after each clock cycle and it is 16-bit timer which means it can only count up to 65536

For getting delays grater than 65536*tclk ,we can use prescaler

Delay can be calculted as follows

Lets find out,what delay can max count genrate with prescalar as '1'

So upto 2.730 milli Seconds prescalar of '1' is enough

For prescaler 2,4,8,16,32,64,128 and full count delays will be

Prescalar should be chosen such that required delay should be just less that max count delay,only tthen delay will be more accurate.

For 80msec prescaler 32 should be chosen

For 300msec prescaler 128 should be chosen

Delay Prescalar CCount
1us 1 24
100us 1 2400
500us 1 12000
2ms 1 48000
80ms 32 60000
300ms 128 56250

Related Solutions

HSC12 Microcontroller To create a delay using the Output Compare Channel 6, we add a number...
HSC12 Microcontroller To create a delay using the Output Compare Channel 6, we add a number of cycles (CCOUNT)to TC6 and then wait until TCNT is equal to TC6. This happens when TLFG1(6) =1. Assuming an E-clock of 24 MHz: Complete the following table in order to generate the given delays: CCOUNT Prescaler Delay 1 us 100 us 500 us 2 ms 80 ms 300ms
COP 2800, Java Programming Assignment 6-1 Using Java create a program using the “Methods” we covered...
COP 2800, Java Programming Assignment 6-1 Using Java create a program using the “Methods” we covered this week. come up with a “problem scenario” for which you can create a “solution”. Utilize any/all of the examples from the book and class that we discussed. Your program should be interactive and you should give a detailed statement about what the “description of the program – purpose and how to use it”. You should also use a “good bye” message. Remember to...
---In the code, create add and delete a student by ID number when prompted /////////////////////////////////////////////////////////////// import...
---In the code, create add and delete a student by ID number when prompted /////////////////////////////////////////////////////////////// import java.util.Scanner; public class COurseCom666 {     private String courseName;     private String [] students = new String[1];     private int numberOfStudents;     public COurseCom66(String courseName) {         this.courseName = courseName;     }     public String[] getStudents() {         return students;     }     public int getNumberOfStudents() {         return numberOfStudents;     }     public String getCourseName() {         return courseName;     }     public...
Compare the ATP output with and without oxygen of a 6 carbon fatty acid to that...
Compare the ATP output with and without oxygen of a 6 carbon fatty acid to that of glucose. Identify the pathways each is catabolized through and the contribution to the total ATP from each pathway. I expect four descriptions in this answer. Where the same pathway is involved (the TCA for example) you can refer to previous descriptions.
Create a C++ program that will prompt the user to input an integer number and output...
Create a C++ program that will prompt the user to input an integer number and output the corresponding number to its numerical words. (From 0-1000000 only) **Please only use #include <iostream>, switch and if-else statements only and do not use string storing for the conversion in words. Thank you.** **Our class is still discussing on the basics of programming. Please focus only on the basics. Thank you.** Example outputs: Enter a number: 68954 Sixty Eight Thousand Nine Hundred Fifty Four...
create a project and in it a class with a main. We will be using the...
create a project and in it a class with a main. We will be using the Scanner class to read from the user. At the top of your main class, after the package statement, paste import java.util.Scanner; Part A ☑ In your main method, paste this code. Scanner scan = new Scanner(System.in); System.out.println("What is x?"); int x = scan.nextInt(); System.out.println("What is y?"); int y = scan.nextInt(); System.out.println("What is z?"); int z = scan.nextInt(); System.out.println("What is w?"); int w = scan.nextInt();...
MUST BE DONE IN C (NOT C++) In this task, using a function, we will add...
MUST BE DONE IN C (NOT C++) In this task, using a function, we will add a range of values of an array. The range will be determined by the user. For example, if I have the following array … 1.5 -5.6 8.9 4.6 7.8 995.1 45.1 -5964.2 … and the user tells me to add from the 3rd element to the 6th element, my program would add the values 8.9, 4.6, 7.8 and 995.1. To do so, please follow...
I need the output of the code like this in java First we create a new...
I need the output of the code like this in java First we create a new building and display the result: This building has no apartments. Press enter to continue......................... Now we add some apartments to the building and display the result: This building has the following apartments: Unit 1 3 Bedroom Rent $450 per month Currently unavailable Unit 2 2 Bedroom Rent $400 per month Currently available Unit 3 4 Bedroom Rent $1000 per month Currently unavailable Unit 4...
Create a student class that stores name, registration number and percentage, grade. Add member functions -...
Create a student class that stores name, registration number and percentage, grade. Add member functions - Read( string n, int r, float p): Read function that accepts parameter - Display(): To display student’s information - CalculateGrade()
Please provide a step by step solution create a Vacation Budget worksheet Add at least 6...
Please provide a step by step solution create a Vacation Budget worksheet Add at least 6 other expenses related to your planned vacation (car rental etc.) enter an estimate of the cost of for each item Use a function to calculate the total estimated costs. g) Enter a function to calculate the average cost per day. h) Create a chart (you choose the type) in this same worksheet based on this trip to display the estimated costs. Add a title...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT