On Sep 4, 1997, John Craft asked... > If this is infantile, excuse me, but on the PIC 14000 > can I make the entire PORTD a general output. > I have set the TRISD, and tried to set the options > to turn off I2C and AD functions with no luck. > > It's as if it toggles. I turn on bit 0, then 1 and 0 goes off. > > Any thoughts. The 14000 is nice, but way too many options. > I had a very similar problem last week using Port C on the PIC 14000 for INPUT. I would provide an external high input on one of the lines, and sure enough, when I read Port C, the corresponding bit was set. Then, if I provided an external high input on one of the other lines, it would set the proper bit, but the other bit turned back off. Needless to say, the problem was quite perplexing. I finally got it to work by doing the following: Prior to configuring Port C for input, I would first configure it for output. Then I wrote 0FFh to the port to set all of the output lines high. Then, I switched the port back over to input (using TRISC). From that point on, there were no more vanishing bits. Why this works is beyond me. I realize that your question was about using Port D for OUTPUT, but the problems you are having seemed similar enough to warrant a posting. As far as the 14000 having too many options, they did indeed pack a lot into this particular chip, except much needed program memory. With only 4K of program space, its a challenge to make use of all of the chips options in a single application. I wish they would make an 8K version of this chip. -- ------------------------------------------------------ /\ Frank Dalton (fdalton@pineinst.com) //\\ Pine Instrument Company ///\\\ 101 Industrial Drive ////\\\\ Grove City, PA 16127 || (412) 458-6391 || www.pineinst.com ------------------------------------------------------