-
1st June 2006 10:55 PM #1
Max4456
Hello,
I am currently trying to put together a 4X4 matrix switch using a Max 4456 with support hardware. It will be controlled a pic or other microcontroller. I am looking for some sample code that will help me get started.
Any help would be appericated.
Thanks
Patrick
-
1st June 2006 11:15 PM #2
There doesn't seem to be much to controlling the 4456. The datasheet seems fairly complete. Control is via 3 source bits, 4 output bits, a write bit and a latch bit. the datasheet even has some basic code. It shouldn't be too hard to do yourself.
-
2nd June 2006 09:53 AM #3
What is your user interface? Push button switches and LEDs, or a PC application?
Regards, Mike
-
2nd June 2006 02:10 PM #4
philba, while it might be true that the programming seems stright foward to you its not to me. I am not a good programmer. I can make hardware stuff, but the programming gives me problems.
My intent is to use a 2 line lcd display with 4 different sections 8 pushbuttons to pick input and output as follows
* * * *
--------------------------------------
' out out out out '
' in in in in '
'--------------------------------------
* * * *
Thanks again for the help
Patrick
-
2nd June 2006 02:44 PM #5
so, what you are asking for isn't how to set a bunch of data lines but how to glue all those pieces together? Do I have that right?
That's a completely different question.
You should decompose the problem. follow a system design methodology. Define the subsystems: button interface, lcd interface, switch interface, main controlling loop. Sketch it out so you have a general idea of program flow (check buttons, set switch, update lcd). define the data passed between subsystems. then drop to the next level and design each subsystem. then you will see the areas you need to investigate.
there is lots of example code but you might have to poke about to find it. button code can be found in a number of microchip apnotes (though not under switches or buttons - try "project" ap notes). LCD examples are all over the place.