??? 09/30/09 20:08 Read: times Msg Score: +2 +1 Informative +1 Good Answer/Helpful |
#169312 - wrong include Responding to: ???'s previous message |
Csmg Sarma said:
#include <8052.h> main() { T2CON |= 0x01; EXEN2 = 1; EA = 1; ET2 = 1; TR2 = 1; while (1) { /* my application code here */ /* This is a test code */ if (TF2 == 1) { /* check overflow */ P1_4 = !P1_4; /* LED1 */ TF2 = 0; } } } You already found out that the interrupt vector for timer 2 is not at the same place as for an intel 8052. Yet you still include < 8052.h >. Who knows what else they moved around. (Well, since I looked, I know. ET2 is at 0xE8 instead of 0xAD.) I think you'd better include < p89v66x.h >. It contains the correct sfr and sbit definitions. Maarten |
Topic | Author | Date |
Timer 2 Interrupt Enable? | 01/01/70 00:00 | |
do you actually clock the T2EX? | 01/01/70 00:00 | |
Yes I am | 01/01/70 00:00 | |
prototype visible to main | 01/01/70 00:00 | |
Some Differences Found in Documentation | 01/01/70 00:00 | |
who know the most about NXP chips ? | 01/01/70 00:00 | |
Can't Get Your Point | 01/01/70 00:00 | |
YES | 01/01/70 00:00 | |
One Problem Fixed | 01/01/70 00:00 | |
wrong include | 01/01/70 00:00 | |
This was the Exact Problem | 01/01/70 00:00 | |
re include files![]() | 01/01/70 00:00 | |
Please check .RST file | 01/01/70 00:00 |