Electronics > Beginners

Pic input/output pins


Just started a project, and have some question, if I make TRISC  ('b'00001111), and try to write(for example):
movlw 0xFF
mowf PORTC

what will happen? will the input pins ignore this, because they are inputs?

For PIC, when you set the pin as an input you disable the output driver for that pin. So writing to the port(x) pin will not affect the pin.

However I do believe that if you change the pin back to an output it will then display whatever your last write to the port(x) register was. So be sure to set the pins to a default or safe position before enabling any pin as an output.

Thanks for help :)

about pull-up -> referring to datasheet OPTION Register controls pull-ups


[0] Message Index

There was an error while thanking
Go to full version