problem in PIT init for mp3 project.

Guest #1171429
Rate this post
• ▲ useful
▼ not useful
i have a problem about PIT interrupt in mp3 project

In the systime.c

#define TCK  1000                           /* Timer Clock  */
#define PIV  ((MCK/TCK/16)-1)               /* Periodic Interval Value
*/

in the board:

#define MCK   48054857

so the PIV value is 3003.7 hz so interrupt will be
at every about 0.3 ms not 1 ms that mention it in comment.

/*  TIME.C:  Time Functions for 1000Hz Clock Tick

is comment is true?
or did i go in fulse?

also in systime_isr:
  if (systime_value % 16 == 0)
      process_keys();

is it true for 10 ms run the process_keys()?(comment 10 ms in control.c)
i want to know how run process_keys() for every 10 ms?
thanks.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.