Author Topic: Pic input/output pins  (Read 2748 times)

0 Members and 1 Guest are viewing this topic.

Offline ZedyTopic starter

  • Contributor
  • Posts: 26
Pic input/output pins
« on: June 24, 2010, 11:56:58 am »
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?
 

Offline Strube09

  • Regular Contributor
  • *
  • Posts: 125
  • Country: 00
Re: Pic input/output pins
« Reply #1 on: June 24, 2010, 03:08:24 pm »
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.
 

Offline ZedyTopic starter

  • Contributor
  • Posts: 26
Re: Pic input/output pins
« Reply #2 on: June 24, 2010, 06:54:07 pm »
Thanks for help :)

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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf