-------------------------------------------------
my_timer_interrupt() // 0.1 msec, 400 instruction cycles @ 20 MHz
{
// tick up all the clocks...
clock1++; // tick up clock 1
clock2++; // tick up vlock 2
// make more clocks!
if (clock1 > 85)
{
// do some stuff that is not to long,
// or set a flag for the main code to trigger off
clock1 = 0; // reset the clock
} // end clock1
if(clock2 > 1200)
{
}
} // end timer interrupt
---------------------------------------
void pivit_2(void) {
PORTB = 0x55;
}
//Statement covering the start up output and input pins of Device.
void main(void) {
Initialization();
while (1) { //running code goes inside this loop
for (f = 4000; f > 0; f--); //int f = 0;
pivit_2();
{
}
}
}
YesHave you tried single stepping this code in the simulator
Users browsing this forum: No registered users and 19 guests