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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/24/05 13:57
Read: times


 
#88330 - Re:Which Compiler
Responding to: ???'s previous message
Lee Kien said:
Hi,

i'm trying to use Timer 2, but it seems that my compiler can't understand/recognise what is T2CON, TR2, ET2, etc. I'm using MCS-51 asembler and linker. I also tried to compile on ASEM-51, but showing the same problem.


0052 D200 40 setb TR2 ;starting timer 2
*** ERROR #18, LINE #40 (0), (PASS 2) UNDEFINED SYMBOL



Lee!
you can compile your code with timer 2
troght direct SFR addressing mode
In asem51,asem5112 or asem5113
You can see any bit address in catalogue
for Understanding code below.



DELAY:
ORL 0C8H,#00000100B ;T2CON SFR ADDRESS
ANL 0C8H,#11111100B ;T2CON SFR ADDRESS
ANL 0C9H,#11111100B ;T2MOD SFR ADDRESS
ORL 0C9H,#00000100B ;T2MOD SFR ADDRESS
TF2?:
MOV A,0C8H ;T2CON SFR ADDRESS
JNB ACC.7,TF2?
MOV 0CDH,#3CH ;TH2 SFR ADDRESS
MOV 0CCH,#0B0H ;TL2 SFR ADDRESS
ANL 0C8H,#01111011B
RET




List of 21 messages in thread
TopicAuthorDate
Which Compiler supports Timer 2            01/01/70 00:00      
   do by hands            01/01/70 00:00      
      Keil?            01/01/70 00:00      
         Alternative            01/01/70 00:00      
         indeed            01/01/70 00:00      
            Nothhing to do with Modern!            01/01/70 00:00      
               then maybe "user's friendly"?            01/01/70 00:00      
                  (in)Convenience            01/01/70 00:00      
               right            01/01/70 00:00      
                  Ah yes...            01/01/70 00:00      
         workaround?            01/01/70 00:00      
      Hands            01/01/70 00:00      
   *ALL* Compilers!            01/01/70 00:00      
   Re:Which Compiler            01/01/70 00:00      
      sure, but why - and it is risky            01/01/70 00:00      
         SFR            01/01/70 00:00      
            agreed            01/01/70 00:00      
   a plethora of derivatives            01/01/70 00:00      
      more on Keil asm            01/01/70 00:00      
         Keil - NOMOD51            01/01/70 00:00      
   define it            01/01/70 00:00      

Back to Subject List