Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Timer ISR problem: how does Q4 function work?

Status
Not open for further replies.

Help

Advanced Member level 2
Joined
Feb 15, 2005
Messages
617
Helped
7
Reputation
14
Reaction score
3
Trophy points
1,298
Activity points
7,065
Timer ISR

Hi,

Anyone know how to explain the red point??

/*-----------------------------------------------------------------*/

#include <Reg52.h>
#define INTERRUPT_Timer_2_Overflow 5

void Timer_2_Init(void);

void main(void)
{
Timer_2_Init(); // Set up Timer 2
EA = 1; // Q1 Why need to set Grobally enable interrupts
while (1); // An empty Super Loop
}

void Timer_2_Init(void)
{
T2CON = 0x04; // bit 3 (0000 0100) = TR2 is set (Timer2 is ON)

TH2 = 0xFC; // Q2 Why don't have any different if i set 0xEC78
RCAP2H = 0xFC; // it should be 5uSec is it??
TL2 = 0x18;
RCAP2L = 0x18;
ET2 = 1;

TR2 = 1; // Q3 The T2CON already set why still need to set again??
}

void X(void) interrupt INTERRUPT_Timer_2_Overflow
{
// Q4 How this function work ??

}


Thank You...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top