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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Andy Neil
09/02/12 16:07
Read: 628 times
Basingstoke
Uk


 
#188215 - Right back to real basics!
Responding to: Richard Erlacher's previous message
Richard Erlacher said:
Perhaps a look at the "bible" would clarify some of what you ask.

Links to the so-called "bible" for the 8051 are here; but I think it's even more basic than that - fundamental digital logic?

"0xFF" is a "short-hand" way of writing the state of eight signals grouped together as a "byte" or "octet".

We write "0xFF" and "0xFE" (hexadecimal) because it's quicker & easier than writing the eight bits individually as "11111111" and "11111110"

Sai Siddharth said:
1) Does this mean the equivalent of 1 is 0xFF?

No: '1' is a single bit; 0xFF is (at least) 8 bits - all at '1'

2) Does 0xFF mean the port is currently HIGH?

On an 8051, a Port contains 8 bits, each of which can, independently, be high (1) or low (0) - so it is meaningless to speak of the Port being "high" or "low".


List of 4 messages in thread
TopicAuthorDate
Does 0xFF refer to HIGH? Simple blink program      Sai Siddharth      09/02/12 09:40      
   Now ... I haven't examined your code ...       Richard Erlacher      09/02/12 12:45      
      Right back to real basics!      Andy Neil      09/02/12 16:07      
   You are nearly there       Jim Granville      09/02/12 16:12      

Back to Subject List