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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/08/08 05:24
Read: times


 
#158919 - write two different routines!
Responding to: ???'s previous message
In the 8051 architecture, SFRs are directly addressed only - it doesn't have any support for indirectly addressing an SFR (or an SFR bit, or any bit, for that matter).

Therefore you would have to implement the equivalent of an if-then-else construct.

In my opinion, in a case like this, it probably isn't worth the effort - you might as well just have 2 separate routines.

I'd say the same for 2 UARTs; probably even 4 - it's only when you get much above that that it becomes worth the effort of trying to write a "generic" driver...

In my opinion.

List of 3 messages in thread
TopicAuthorDate
Routine parameter for port pin            01/01/70 00:00      
   write two different routines!            01/01/70 00:00      
   as long as it is on one port...            01/01/70 00:00      

Back to Subject List