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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/21/04 15:15
Read: times


 
#83575 - Finally
Responding to: ???'s previous message
in some of the example code i found on keil's website, they set the ports to be inputs by initially writing 0xFF to them. I know all the ports (i think) start out as 0xFF, so since their latches... this shouldn't change anything should it?

Nope. It doesn't change anything... ASSUMING that nothing was changed after RESET by another pioece of code. But, what it DOES do is give the software developer confidence that the port bits are in the right state.

It's kinda like a gun. When you take down your shotgun to pack up and you know that you unloaded it before you put it away last time are you just gonna ASSUME that it's empty and start clicking away on the trigger? If you've ever taken a gun safety course, you'll know that the first this you do with a gun is to make sure it's NOT loaded.

That's all we're doing by setting the port bits high.

I'm still not quite sure about how all that directional setting goes on the 4 various ports that are available.

Basically, all 4 ports are identical with the exception of Port 0 (since it's usually connected to the low byte of the address bus and the data bus).

Jon

List of 37 messages in thread
TopicAuthorDate
AT89C51SND1C starter help?            01/01/70 00:00      
   start here            01/01/70 00:00      
   AT89C51SND1C starter help?            01/01/70 00:00      
      more info            01/01/70 00:00      
         ISP            01/01/70 00:00      
   senior design team            01/01/70 00:00      
   skeletal setup            01/01/70 00:00      
      much simpler            01/01/70 00:00      
         "Simpler" is not the objective.            01/01/70 00:00      
            simpler...            01/01/70 00:00      
               Development board            01/01/70 00:00      
                  Don' t mess with hyperterminal            01/01/70 00:00      
                     With respect, I disagree            01/01/70 00:00      
                        Hmm.            01/01/70 00:00      
                           Hmm indeed.            01/01/70 00:00      
               serial port            01/01/70 00:00      
                  lil' more info            01/01/70 00:00      
                     Mix            01/01/70 00:00      
                     No serial port?            01/01/70 00:00      
                        USB            01/01/70 00:00      
   quick question            01/01/70 00:00      
      startup.a51            01/01/70 00:00      
      Post the code            01/01/70 00:00      
         Post the code            01/01/70 00:00      
            here's the code            01/01/70 00:00      
               Some suggestions            01/01/70 00:00      
               Port 0            01/01/70 00:00      
                  development board ports            01/01/70 00:00      
                     yes, you can            01/01/70 00:00      
                        Thats 'cause its            01/01/70 00:00      
                           sorry...            01/01/70 00:00      
                              Pull up resistors            01/01/70 00:00      
   FINALLY!            01/01/70 00:00      
      Finally            01/01/70 00:00      
      Why only taking a +quick skim+?            01/01/70 00:00      
         What? No magic?            01/01/70 00:00      
         Think!            01/01/70 00:00      

Back to Subject List