Problem using Timed Interrupts

I am trying to set up an interrupt that executes every 20ms. (This is for generating a R/C signal to my scorpian board motor driver) I have a Basic Atom 28m and bot board Mini-ABB.

Anyway I am trying to find some documentation on how to set up the on board timers (TCRV) so i know what values to load in then for a 20ms timer. Then I could use a TIMERVINT_OVF to execute my handler every 20ms.

Any help would be appreciated.

Look at the H8/3694 manual, that you can open from the help menu of Basic Micro Studio. Look at section 11.

The clock is running at 16mhz and you wish to interrupt at 20ms. Which if my calculations are correct is 800 clocks. So you can use a clock source of /4
With this you wish to have the interrupt generated when the counter gets up to 200. Couple ways to do this. Could initialize the counter to something like 55 or could use a compare match instead of overflow. Suppose you use compare match A

You Could then initialize the registers probably something like:
TCRV0 = 0x49 ; Interrupt on Compare match A, Reset on Compare Match A and clock / 4
RCRV1 = 0
TCORA = 200

You would need to setup interrupt handler and the like, but hopefully this will get you going.

Kurt

is the syntax different if i have a pic16f876? I just noticed it was a PIC instead

Yeah, the PIC has different registers, pins, instructions, etc.

Alan KM6VV