Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 2nd July 2004, 03:09 AM   (permalink)
Default 1 port with multi input and output function

hi, i am new on PIC.. i got a project which used PIC16C57C which are use for timer counting.
The portC as and output of 4 seven segment display and also the input of a time setting switch.

so, initially, i write the program, i configure the port c at output.. but then after i display the '0000' on 7 segment, i need to proceed to process 2 which detect the input of port c, to check the switch which got press and got signal in to MCU. So, how can i configure the port c bo be input??

what metter i try to configure it for eg:
....
....
movlw b'00001111' ; -- port c pin 0,1,2,3 as input
movwf trisc

btfsc portc,0
goto result
...
...
but it still not functioning..

is that possible for a port that change from output to input suddenly?

my other I/O port already fulfill with other application... any one can give me some suggestion? thank you very much...

wish some one can reply me asap.. thanks.
__________________
yce_kelvin
yce_kelvin is offline  
Old 2nd July 2004, 04:06 PM   (permalink)
Default

How did you connect the switch?
Exo is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 06:11 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker