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 07:27
Read: times


 
#88277 - do by hands
Responding to: ???'s previous message
hi,

Lee Kien said:

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.


The problem might be that the software does not support 8052-like devices and so does know nothing about 52-specific hardware and its registers.
The solutions may be:

1) use "modern" software like Keil etc.

2) if software does support for 8052 then look at datasheet and search how to indicate that you use 8052. For example, at old times when I used "2500 A.D. 8051 Macro Assembler" next line have been added before code:
        CHIP    8052
3) if software does not support 8052 then define these registers by hands. The syntax depends on assembler, for that software I have used it was like:
T2MOD   REG     C9h             ; TIMER 2 MODE CONTROL REGISTER
In fact your assembler may use "EQU", "SET" or another keyword instead REG - look at manual. Then define all 52-specific registers and bits manually before they have have been utilized (I would do it in separate include file).

Regards,
Oleg


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