CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Push Button Key Matrix

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
wordizlife



Joined: 08 Mar 2012
Posts: 38
Location: Canada

View user's profile Send private message

Push Button Key Matrix
PostPosted: Wed Apr 18, 2012 5:46 pm     Reply with quote

Hey guys,

I am making a 4 button key matrix for my project. The matrix will be directly connected to 5 pins on the microcontroller. Below is a link to an image of my schematic.

http://imageshack.us/photo/my-images/195/buttonschem.png/

Is there anything any of you would suggest I watch out for? Missing diodes for example?

Thanks!
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Wed Apr 18, 2012 6:04 pm     Reply with quote

as drawn this is not a matrix
it is just 4 switches with a common

BTW: I'm always eager to learn a new trick,
but is there any reason you are using two poles to switch??
wordizlife



Joined: 08 Mar 2012
Posts: 38
Location: Canada

View user's profile Send private message

PostPosted: Wed Apr 18, 2012 6:13 pm     Reply with quote

If I am not mistaken that is a key matrix.

Maybe this schematic will be clearer:

http://imageshack.us/photo/my-images/7/screenshot20120418at809.png/

I am only using two poles in this schematic because my push button has 4 connections and the pattern for this component fit perfectly.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Wed Apr 18, 2012 6:49 pm     Reply with quote

OK have it your way Very Happy Very Happy
Though, for at least the last 4o years or so of my professional practice,
I thought a matrix involved rows ( plural ) and columns that were interconnected ...

SO, if i were wiring a matrix of 4 switches i would use
ONLY 4 wires TOTAL.

You seem to have 5 - so i still will not call it a matrix.

Sorry but IMB, its just a garden variety 1 of 4 selector.

Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Thu Apr 19, 2012 4:10 pm     Reply with quote

OK. So you could call it a 1*4 matrix.

The general idea with a switching matrix is to reduce the number of external WIRES to a MINIMUM.

This is achieved by making the matrix as near square as possible.

In your case that's 2*2.

Mike
wordizlife



Joined: 08 Mar 2012
Posts: 38
Location: Canada

View user's profile Send private message

PostPosted: Thu Apr 19, 2012 5:23 pm     Reply with quote

Yes that makes sense. Thanks. So I'm guessing that there is nothing more to it then that?
As long as there is nothing that I should watch out for that could damage my PIC or give me unwanted errors I am good to go.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group