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 14:41
Read: times


 
#88340 - sure, but why - and it is risky
Responding to: ???'s previous message
you can compile your code with timer 2
troght direct SFR addressing mode
ORL 0C8H,#00000100B ;T2CON SFR ADDRESS


Of course, you can, but why not just include the correct SFR definition file (whatever your brand of assembler/compiler calls them)

Another aspect is, that while it is unlikely that any new derivative will have different SFR addresses for T2, using absolute addresses should be discouraged in all cases. A small side effect of this is the possible unpleasantness that could arise from the assembler/compiler not "knowing" that something is a SFR (e.g. Keil has the 'sfr' data type)

Erik


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