PIC16F877 and Pins Prob

Hi,

I have a problem when I tried to activate 3 PINs simultaneously... :-( I have this prob too when I only set 2 Pins which are following from a simple command; the command will not be executed :-( Has anyone ever had this ?

Thanks

Chris

Reply to
chris
Loading thread data ...

If you are trying to do either a BSF or a BCF try inserting a NOP after each instruction.

Or trying to modify all pins directly via the AND instruction.

Hopefully this helps....

Reply to
Dunno WhoCares

"Dunno WhoCares" schreef in bericht news: snipped-for-privacy@4ax.com...

Do you use opencollector driver pins? Some pins will pull only low, you have to use a resistor to pull these pins high. Some PIC's use a command for port B to activate internal pull-up.

Alexander

Reply to
Alexander

pins

The PORTB pull-ups are for input only. All PORTB pins are totem-pole outputs. The OP probably has them heavily loaded so he/she is experiencing the read-modify-write perils. The use of a "shadow register" would be appropriate here (and elsewhere for that matter :-).

formatting link

Reply to
Anthony Fremont

"Anthony Fremont" schreef in bericht news:tfoHf.14512$ snipped-for-privacy@tornado.texas.rr.com...

The RMW problem works on the other pins. If I set pin 1, pin 1 is always set, the other pins may chage there value.

Reply to
Alexander

TELL US MORE CHRIS

is port set up as an output have you disabled the the ports other options the easy way to set a whole port high is with a move

something like :-

movlw b'00000011' ;the 11 being port bits 0 and 1 movwf portb ; loading port with value .this should set 2 pins high

as others have said you can AND it too, But for we know you could be doing this in picbasic or something more exotic.

Reply to
david

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.