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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/18/06 18:51
Read: times


 
#116551 - Hmmm...
Responding to: ???'s previous message
Right, only byte addresses ending in 0 or 8 are bit addressable. It just seemed a little confusing to me. Adding to my confusion was why the following wouldn't output to the correct LEDs:

...

sbit P1_0 = 0x90 ^ 0;
sbit P1_1 = 0x90 ^ 1;
sbit P1_2 = 0x90 ^ 2;
sbit P1_3 = 0x90 ^ 3;
sbit P1_4 = 0x90 ^ 4;
sbit P1_5 = 0x90 ^ 5;
sbit P1_6 = 0x90 ^ 6;
sbit P1_7 = 0x90 ^ 7;

...

P1_1 = 1;
P1_3 = 1;


All eight of my LEDs continued to stay on and I figured it my be a problem with my understanding the SFR addresses. Then I realized that on reset the ports are set to 1. Doh.

List of 12 messages in thread
TopicAuthorDate
SFR has thoroughly confused me...            01/01/70 00:00      
   bits and bytes            01/01/70 00:00      
      Hmmm...            01/01/70 00:00      
         Always            01/01/70 00:00      
         does thyis make sense            01/01/70 00:00      
         Why?            01/01/70 00:00      
            Yup.            01/01/70 00:00      
               of course it is            01/01/70 00:00      
   sharpen them first            01/01/70 00:00      
      Ah ha!            01/01/70 00:00      
         paper and file            01/01/70 00:00      
            The best of both            01/01/70 00:00      

Back to Subject List