Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Connecting sub-boards to a PIC

Status
Not open for further replies.

henninggs

Member level 2
Joined
Nov 10, 2011
Messages
45
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Denmark
Activity points
1,688
Hi
I'm sure there is a "standard" way to solve this problem. I just don't know it. Here is my thoughts.

If I have a PCB that should be connected to a PIC (using 4 pins) on another PCB, then I'll just connect the two with a cable. Now let's say I have 16 PCBs I need to connect to the same PIC (still using 4 pins)...
The PIC should be able to send data to each of these 16 sub boards but never at the same time.

I was thinking of using another 4 pins to control a 4-to-16 demux and have the output from the demux control 16 bilateral switches that each will handle the connection to the PICs 4 data pins for a single sub-board.
Like this:
matrixmixer_mainboard2.jpg

1. Is this the right way to do it ?
2. Will my circuit work or am I missing something ?
3. Also, is there a premade PCB for such a circuit. Could be nice to just pop in a PIC on a premade PCB.

Thanks.
 

Re: Selecting sub-boards

If you slightly modify the protocol you can make packets which can address different devices. Each of the uP in the modules can have its own address so without adding additional hardware you can address as many uP as you want.
 

Re: Selecting sub-boards

Hi kuben11. Thanks for your reply.

I'm not sure what you mean by "uP"
But with your approach I need a PIC on each sub-board don't I ? To decode the addresses.
My setup will be used in a matrix-mixer. Each sub board will consist of a 4-to-16 demux connected to 16 volume controls (PGA2311) nothing more.
I would like to keep each sub board identical.
 

Re: Selecting sub-boards

uP - (Microprocessor)

Yes, you need to put different addreses into each board in order to make this approach working.

One other solution is to have so called enumeration pins (one input and one output pin). Enumeration pins are connected serially. The host sends single pulse on the first pin. Each uP is delaying the response with one command sent via the main serial port. So you'll be able to enumerate the devices automatically. The address you get into each uP could be recorded into EEPROM so there will be no need to reprogram the addresses on each power up.
 

Re: Selecting sub-boards

Yes, I see. That's a nice approach. (I did wonder how I could distribute the addresses if I wanted to have the exact same code in each slave-uP)
For this project though (my matrix-mixer) I'll see if I can make it work without additional PICs on the 16 slave boards.
 

Re: Selecting sub-boards

yes, you can put as many boards as you want. Just two pins dedicated to the enumeration (one input and one output). Also you'll need special protocol to form packets with addresses.

When you make a short pulse on the first enumaration pin the chip will go into ENUM mode, the packet it gets immediately after this will be considered as the address of the unit and will be stored into EEPROM. The just enumerated device will response with some acknowledge code to show the master everything is OK. A pulse on enum line will be generated so the next chip will go into enumeration mode.

You can also have some protection against accidental enumeration - the enumeration could work only 5-10s after power up
 

Re: Selecting sub-boards

Thanks kuben111. I'll keep this in mind.
For now I'll go for a single uP-solution and try to make it work with nothing but switches and demuxes as shown in my attachment. It is worth a shot I think..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top