Other Parts Discussed in Thread: EK-TM4C1294XL
Hello,
I have a two part question. What would be the best way to get the most accurate delay?
I am currently using a nested for loop but it seems like its off some. I have my loop as is below. Assuming the 16 Mhz CPU Clock.
void milliDelay(int t)
{
int x, y;
for(x = 0; x < t; x++)
for(y = 0; y < 3180; y++)
{}
}
Second question is how do i properly utilize the Interrupt Priority? I am reading page 153 of the TM4c Data Sheet and it doesnt explain much other than it holds a 0-7 priority value. What is that in reference to?
I understand the Pri0, Pri1 Etc. but not sure how to set the priority of the interrupt.
Lets say I want to use port E's interrupt. That would be (interrupt enable) EN0 and Pri1.
How and why does the priority come into play? And what priority is it comparing itself to?