First time with PIC, first strike

Status
Not open for further replies.

striker2509

New Member
Sorry to ask something this easy for someone who really knows. im trying to read from PORTB, put that value in PORTC and activate an enable bit of a demux....how can i do this?. Im trying to put the value of PORTC into W, and the PIC there is no output at all.

Hope u can help me. sorry again
 

I'm not very clear at all what you're trying to do?, you refer to full ports, then mention a single bit? - are you wanting to access the single bit?, or the full port? - the commands are both very simple, but both totally different.

Assuming you want to copy the full contents of portB to portc (which is what it sounds like? - although it doesn't make much sense?), you do it like this:
Code:
movf PortB, w
movwf PortC

As easy as that!. Obviously the ports must be set correctly, this is done in the TRIS registers.
 
make myself clear!

Hi again, what im trying to do its a way to control 20 74ls154 (4-16 line demux) with a PIC16F877 . To control all the IC's, i need to switch the enable pin of each Demux. if i set an enable, n that moment, the 4 bits data must go through the demux and activate a biestate (latch) connected to the demux output. Did i make myself clear?

Thank you again... See ya
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…