Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Connecting Multiple PIC Outputs

Status
Not open for further replies.

Suraj143

Active Member
Hi

I need to make a 4 wire bus & read the particular PICs output from the main controller.

Can this do?
 

Attachments

  • Multiple Outputs.PNG
    Multiple Outputs.PNG
    6.4 KB · Views: 171
Last edited:
The safe way to do that is to use pullups on the four lines and only every set pins to output and low. Any lines that need to be high are left as inputs. So to put 0011 on the bus you would set the tris bits to output, output, input, input.

Mike.
 
Sure, as long as only one PIC's TRIS register is set to output at a time. The code in each PIC will have to watch the respective "ChipEnable" input Pin, and then set its four output pins to output mode only as long as ChipEnable is high; when it goes low, it will have to set its four output pins to input mode.
 
Sure, as long as only one PIC's TRIS register is set to output at a time. The code in each PIC will have to watch the respective "ChipEnable" input Pin, and then set its four output pins to output mode only as long as ChipEnable is high; when it goes low, it will have to set its four output pins to input mode.

That's exactly what I'm going to do.The PIC outputs always set to INPUTs by the TRIS registers.It will turn the TRIS to OUTPUTS one at a time by the chip select pins.
 
Hello I have a problem.

My master controllers 4 wire bus lines I have configured as inputs.No any pull ups or pull down resisters.

When a slave pic output logic "1" in the bus will the master controller detect it nicely without any pull up or down resisters?
 
My other problem is I want to send an 8bit data.But there is only a 4 wire bus.So I'm sending 2 nibbles one after the other.

The thing is master controller needs to know when to read the nibbles!Is it ok if I define a time period.

Let say after setting the chip select you wait 20uS & read the lower nibble.Wait another 20uS read the upper nibble.

You must make sure the slave PICs also must use these timings.

Is this method ok?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top