Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/26/04 15:52
Read: times


 
#83887 - Timer 2 in clock out mode
I am trying to get clock (Some frequency) using timer 2 in clock out mode. The program is neither working on Simulator nor the actual hardware(Programmed 89C52). I am using Keil C compiler. The code snippet is as :

int true = 1;
sfr T2MOD = 0xC9;
void main(void)
{
RCAP2H = 0x20;
RCAP2L = 0x20;
C_T2 = 0;
T2MOD=0x01;
TR2 = 1;
while(true)
{
P2 = 0x20;
}
}
HERE I HAVE WRITTEN P2 = 0x20 IN WHILE LOOP INSTEAD OF NOP ONLY.
I am only interested in getting clock out on pin P1.0



List of 3 messages in thread
TopicAuthorDate
Timer 2 in clock out mode            01/01/70 00:00      
   Easily made mistake            01/01/70 00:00      
   timer 2 clock outmode Block diagram            01/01/70 00:00      

Back to Subject List