Hello Mac,
This is the full code
#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
void main(){
PTBDD |= (unsigned char)0x40;/* Set PTB6 as output */
MTIMCLK = 0x08; /* Bus clock 256 divider */
MTIMMOD = 0x77; /* Count to 0xFF */
MTIMSC = 0x60; /* Enable overflow interrupt and start counter */
}
__interrupt void Vmtim_isr(void)
{
PTBD_PTBD6 = ~PTBD_PTBD6; /* Toggle the PTB pin */
MTIMSC; /* Clear the TOF flag */
MTIMSC_TOF = 0;
}
when this code is compiled and simulated the same way as i said before during simulation it resets automatically within a second .. Could u pls help me in giving the prog for a timer using timer flag based on the time the led should blink c...
With Regards,
Sans