On Tue, Mar 18, 2003 at 11:05:05AM -0500, Augusto Yipmantin - OA4CVT wrote: > Hi Sid, > > Thank4s for your answer, what I have to do is to set 3 relays with the RB4, > RB5 and RB6 and 3 leds with the RB1, RB2 and RB3, the RB3 does not turn to > on, and checking the 877 data sheet just found in the special features > section the configuration word must be changed to get general io pins in > that port. That's partially true. RB3 is designated as the LVP pin. To get it back to normal I/O simple program with a high voltage programmer and clear the LVP bit. As for the others (and RB4 isn't included), the multiplexing is automatic and modal. RB6 and RB7 are always general I/O when the PIC is running in standard mode. Also they are always CLK and DATA respectively in programming mode. So unless you are doing ICSP, there should be no conflicts. One last thing: The relays are probably not going to work being driven directly from the I/O pin. Check the current requirement. Most likely it's more than that max 25ma that the PIC I/O pin can drive. For a brief overview of relay drivers check out here: http://www.saburchill.com/tech/electronics/elect027.html BAJ > > > Just with a little problem trying to set as Output Pins the RB6, RB7 and > RB4 > > > pins of an PIC16F877. > > > By default RB4, RB6 and RB7 are multiplexed pins to Low Voltage Prog. > > > Can any help me a little on how to change the Configuration Word to > enable > > > the general io feature in this pins ? > > > > > > Hello, OA4CVT > > > > I have used the pins on PortB on the 877 many times and I simply program > them > > as I want them to operate. B7 and B7 are ICSP pins but I just ignore > that. > > If youwant the pins as outputs, write trisb = 0. If you want them as > inputs > > write trisb = 255. If you use the pins for serout or serin, > > theyautomatically fo to the proper state, then return to their preset > state. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads