Hi every one
Im new to pic. Class assignment
I need your help in making my pic18f4550 respond directly to the input of one of the ports.
Example
port c is 8bit output connected to 8 leds
port d is input connected to 8 push buttons
now if i push one button on port c i need the same bit on port b to turn on.
Im using c with Hi-tech c and pic kit 2
thanks for reading
thanks for your suggestions
Just read the Port D (Dig. In) into the w register and write it to the PORT C Register (Dig. out). Two instructions.
movf PORTD,w
movwf PORTC
loop that and you're done.
That's the 16F asm version. 18F has the movff instruction which could prob be all u need. No multiplexing required as u have a pin per button and an LED per pin.