
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
[EMAIL PROTECTED] (Brian Farmer) wrote in news:[EMAIL PROTECTED]: > I am using Atmel's 20-pin 8051. My question is how do I assign Port 1 > as an output, becuause once I program the chip I have to reset it once > to get it to not have P1 floating. After the reset it works fine. I > don't assign the P1 direction one way or the other for now. Write a 1 to the port SFR before reading it as input. For ouput, just write your value - done. The pseudo-bi-directional nature of the ports is both nice and a real pain. See Intel's scanned PDF copy of the MCS-51 User's Manual available on their website for a nice picture of the port structure. Note that P0 and P2 will require pullups but you don't have them on the 2051. -- - Mark -> --
| <-- __Chronological__ --> | <-- __Thread__ --> |