[PIC] Multiplexer with PIC16F877

Status
Not open for further replies.

anishpsla

Member level 2
Joined
Dec 15, 2013
Messages
44
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Visit site
Activity points
402
I want to use 4X1 (74153) multiplexer to my project. The output of the Mux is connected to a counter pin of PIC. I am confused about how to select common select Inputs. I am using RA1 and RA2 pins for this purpose.

 

Connect pins 1 and 15 to ground to enable the outputs. For MUX 1 provide inputs to pins 3, 4, 5, 6. To select the input that is to select the input that should appear at output set pin 14 and 2 to 00, 01, 10 or 11.
Channel selection pins 14 and 2 are common for both the muxes.
 

Thanks for your reply. I need code example for giving 00,01,10 or 11 to channel selection pin.
 

To set pin you use PORTx.Fx = 1 and to clear you use PORTx.Fx = 0 in mikroC.
 

Attachments

  • MUX.rar
    35.3 KB · Views: 113
Last edited:
Reactions: anishpsla

    V

    Points: 2
    Helpful Answer Positive Rating

    anishpsla

    Points: 2
    Helpful Answer Positive Rating
But how to change portB.B0 = 0 portB.B1 = 0 next
portB.B0 = 0 portB.B1 = 1 next
portB.B0 = 1 portB.B1 = 0 and next
portB.B0 = 1 portB.B1 = 1 using MikroC . This is the real problem for me.
 

Thanks for the attachment. I got the idea for my program. Once again thanks for your quick reply.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…