Loading ...
Sorry, an error occurred while loading the content.


Expand Messages
  • Aeva
    Nov 25, 2009
    • 0 Attachment
      Hi everyone;

      I'm writing code to run on the OKI ML67Q5003 header board. I'm interested in using the timers, but I can't seem to find much information on how. Best I can seem to find is some specific examples to for the game boy advance; but that doesn't translate well in this case.

      I gather from looking at one of the headers I use, I'd pick a timer, and use the 5 registers associated to it to control it. Let's say timer 0, which leads me to this:

      TIMECNTL0 // timer0 control register (RW,16,0x0000)
      TIMEBASE0 // timer0 base register (RW,16,0x0000)
      TIMECNT0 // timer0 counter register (R,16,0x0000)
      TIMECMP0 //timer0 compare register (RW,16,0xFFFF)
      TIMESTAT0 // timer0 status register (RW,16,0x0000)

      What do I have to write into them to set it up? And how does it work? Do I set a value, and then the timer decrements/increments until it overflows, and signals this with an interrupt? Or with the status register? Or do I set it to zero, and then have my code loop until it contains a value I like?