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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/05/00 14:12
Read: times


 
#2510 - RE: Weird input port problem
A few clarifications:

1). The errors that you are getting are when you compile a program reading the P5 port? Can we see some code and error messages.

2). A P5 is available on a few 8051 models, but is not standard. I assume from what you've written that you have confirmed that the monitor accepts P5 as a valid port. Are you using a compiler/assembler properly configured to support P5? Its possible that the monitor for that robot project supported it, but the compiler/assembler you are using does not support it.

3). The reason everyone mentioned writing an 0FFh to the P5 port prior to using them as an input is because internal to the 8051, its a necessary step. During your initialization routine, you need to have each input pin written high. The 8051 powers up in that state, but since you are using a monitor, its easy to change one of those input pins in such a way that they won't function properly again until re-initialized. This however is not the problem you appear to be describing.

4). While the 8051 has bit addressing for I/O pins, it doesn't mean that byte wide reads and writes to a port are a bad idea, particularly during initialization routines. It often more efficient, saving time and code space. Boolean logic and commands allow you to look and test several pins at the same time.

5). A URL would be nice. I scanned for references of Blackjack and Telecontroller but didn't find one.
[SIDE NOTE TO ENTREPRENEURS: DO NOT NAME YOUR COMPANY OR PRODUCT WITH THE NAME "BLACKJACK" - NO ONE WILL BE ABLE TO FIND IT INTERMIXED WITH THE CORNECOPIA OF GAMBLING REFERENCES.] :-)

-Jay C. Box


List of 14 messages in thread
TopicAuthorDate
Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      
RE: Weird input port problem            01/01/70 00:00      

Back to Subject List