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.

Need advice for choosing a PIC

Status
Not open for further replies.

ChemE

New Member
Hi I am brand new to this forum and am hoping to learn. I am very new to building circuits and PICs so bare with me. I only have circuits knowledge from physics 2 and circuits for non-EE majors.

I would like to build a circuit board that would allow me to solder 25 buttons from another device onto it and have a PIC control when these buttons are activated.

So my question is can you attach 25+ buttons to an 18 pin PIC (like the 16F88) or do you need to have a PIC with pins>25?

I attached a picture below that I made showing a VERY basic schematic of what I would like. I have 2 PS/2 ports in there because I would ideally like to connect the PIC to a keyboard/mouse to control this device.

Also could anyone give me some advice on how to design a circuit for this? I have Eagle Cad but I have no idea how to build a schematic (where do I need a resistor, capacitor, other types of processors, etc...)

I need help if I am ever going to be able to build something. Thank you.
 

Attachments

  • Schematic.JPG
    Schematic.JPG
    26.1 KB · Views: 253
For 25 input pins I would recommend using the 16F877.. it is a 40 pin PIC with 33 input/output pins.

This way you will have extra pins for any add-ons..

Also this PIC has a considerable amount of memory.

Can you please restate what you are trying exactly to do? What do you want the end circuit to do? You will get alot more help with a clearer explaination.

Good luck,
Peter Wadley
 
So my question is can you attach 25+ buttons to an 18 pin PIC (like the 16F88) or do you need to have a PIC with pins>25?
You can control 25 buttons with a 5x5 matrix which would require 10 pins on the PIC. Since this 25 button keypad is in a pre-existing product, I would assume it is already being scanned by a micro controller. I would program your PIC to detect the scanning of the keyboard ROW and output the appropriate signal to the corresponding keyboard COLUMN for the desired simulated key press. You can use the TRIS bits in the PIC to isolate the PIC from the keypad as needed. This assumes the PIC can run on the same supply voltage as the pre-existing product.
I have 2 PS/2 ports in there because I would ideally like to connect the PIC to a keyboard/mouse to control this device.
Probably not a project for a beginner. What exactly are you trying to do? You may not need these input devices and something simpler may be better.
 
Last edited:
Thank you for your great comments. As Peter_Wadley & kchriste requested, more detail on what I would like to do.

I would like to take an xbox 360 controller solder wires to all the buttons and 2 analog sticks. I would then like to create a circuit that will have inputs (solder points) for the controller wires and two PS/2 output ports for mouse and keyboard to attach. A PICmicro will be somewhere in between. I hope this is enough detail to understand what I am trying to do, I have attached a picture that should help in understanding my idea.

I know this project is not for beginners but I will keep on learning until I know enough to accomplish my goal. :)

So this brings me back to my orignial question: Can I use a 18 pin PIC to control the 25+ buttons on the 360 controller?

kchriste, what is a 5x5 matrix and will it solve my 18 pin problem?

Thank you for your help! If anyone knows of any tutorials that can help me to understand how to take an idea, create the schematic, turn that into a circuit it would be SOOOO helpful.

Please do not suggest me purchasing an XFPS 360 attachment. I know it will do this BUT it lacks ALOT... so I would rather build my own. Plus it gives me a hobby to work on and I will learn a lot for future projects.

Lastly, Gayan Soyza thank you for starting the obvious... very helpful.
 

Attachments

  • x360 controller diagram m-k ps2.JPG
    x360 controller diagram m-k ps2.JPG
    30.8 KB · Views: 396
ChemE,

You are going to need alot of practicing with the PIC before making a large, ambitious project like this. Well not ALOT but enough to know your way around the PIC, (they are pretty much all the same in structure...)

Check out this thread.

Maybe it's just me.. but I fail to understand the point of connecting input devices to... other input devices.. :confused: :p

Using the forum alone you will be able to learn what you need to know.. when logged in you have access to the search button on the toolbar.. it will literally give you endless hours of reading.. I know from expierence :D

Goodluck,
Peter Wadley
 
ChemE, not to discourage you, but you're going to have a lot of difficulty doing this. I appreciate you're determination. I've spent a LOT of time hacking game console controllers, especially for use with arcade fighting sticks.

The xbox360 controller doesn't work like almost every other console controller does; the controller doesn't use a common ground for it's inputs. This makes hacking it much more difficult than other systems.

The single best source for help hacking it would be **broken link removed**
He used the 74HC4066N analog switch chips to connects the buttons on the 360 controller and get around the lack of common ground. It would show that the buttons are pushed in all the way hard since there is practically no resistance, but you could probably find some sort of digital potentiometer to use if you needed adjustable analog pressure on the buttons.

The potentiometers on the analog sticks, and triggers, may be something totally different. I havent hacked a 360 pad, but Ive done my share of xbox1 pads, and the xbox1 triggers and analog sticks used potentiometers to see how far in what direction the analog was at. If they used the standard method of +5 on one end, GND on the other, and detecting the voltage on the center pin, then I think you can use any digital to analog converter in its place. Sorry Im not certain, but since my work as been arcade fighting games, everything I've needed has just been digital :)

Frankly, you're not at the stage where you need to decide on which PIC. First you need to figure out how to hook up the 360 controller in a simple way for any device to use, then figure out what will drive it.

Peter_wadley said:
Maybe it's just me.. but I fail to understand the point of connecting input devices to... other input devices.. :confused: :p

The Xbox360 controllers have a special security chip in them that hasn't been cracked yet. In order to get your prefered input device working on that console, you have to hack them in a manner similar to this. If it were possible to just use some USB HID descriptor in a PIC and have it work, I'd totally agree with you.
 
Last edited:
If it were possible to just use some USB HID descriptor in a PIC and have it work, I'd totally agree with you.

It is possible to use a PIC that supports USB, but I am not sure whether the effort is entirely worth it

thanks
 
kchriste, what is a 5x5 matrix and will it solve my 18 pin problem?
Yes, you'll only need 10 pins to control 25 buttons. Check out Nigels tutorials. His shows a 4x4 matrix but the principle is the same. You could do it with 2 CMOS 4051 analog multiplexers to stimulate the 360's buttons and use even less IO's (Total of 7 IO's to control 64 buttons via 4051's in a 8x8 matrix).
 
You could use N(N-1) multiplexing to scan 25 keys using only 6 I/O pins but that's really beside the point because you're going to be limited by the configuration of the key switches in the controller. You simply may not be able to interface with those key switches.
 
Status
Not open for further replies.

Latest threads

Back
Top