Electronics > Beginners

Pic input/output pins

(1/1)

Zedy:
hi!
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?

Strube09:
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.

Zedy:
Thanks for help :)

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

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod