reading a 4x4 switch matrix

Status
Not open for further replies.
This is an exercise in futility. 150 posts ago, working code was handed to MrDEB. That working code included essentially one line needed to use Swordfish's routine to read a keypad.

I pointed out to MrDEB that he can't have the PICkit 2 connected to the ICSP connector while he's trying to read the keypad. MrDEB, completely ignoring that comment, replied "I have it connected during testing." Once again, MrDEB has decided that the world works in a special way for him, and the PICkit can't be connected while you are using the keypad doesn't apply to this case because it's not convenient.

MrDEB, deep in his research of sticking in random punctuation and words he doesn't understand, can't be bothered to post his code either, so we don't even know if he's actually calling the function to read the keypad. Who says helping MrDEB....um.... attempting to help MrDEB, isn't a valuable activity.

I wonder how many thousands of hours people have spent trying in vain to help MrDEB? Thousands I don't believe to be an exaggeration because I am certain at least one or two of those thousands have been mine.

I do have to thank MrDEB however. Prior to post #32, I had never tried reading a keypad. It had always seemed a little tedious, and I'd never had the need to do it. Now, thanks to 10 minutes of grueling effort, I have a new tool in my toolbox.
 
LOL... Yep! You never played by the rules..

I had enough... Needed to get out for a while...
Kinda sad, but if it means you hang around then thats good. Being a MOD is alot like being a traffic warden, everybody moans about cars parked on pavements and yet hate the people who get them moved!

A day of revelations!!! Now i get told we got rules!! Learnt loads today
 
I'm not reading everything, I just came in here to ask how did this thread get to 10 pages long from such a simple question?!
 
I'm not reading everything, I just came in here to ask how did this thread get to 10 pages long from such a simple question?!
Huh!!!

This is nothing, come back at page 30...we got at least 11 code changes yet and then we have the switch change. The chip might or might not stay the same...... No offense but your clearly new to these threads .
It will be full to the brim of useful info and code by the end, none of it used by the OP. But useful to others.

As to your question.....You ever tried passing a bad accident on the other side of the road and not turning your head? Well this is the mother of all train wrecks, or will be.
 
Thread's drifting.... Pretty women pretending to solder isn't 4x4 matrices...

( Not that you have to care what I say any more )

I'm not reading everything, I just came in here to ask how did this thread get to 10 pages long from such a simple question?!
You know it's not easy to bloat these threads to more than 500 posts and stay on topic.

At least two complete working Swordfish BASIC projects have been posted to this thread that MrDEB has not really learned from.

This is MrDEB's safari I am here to see the sights and go on some excursions.
 
I tried Jonseas suggested code and later I am told to remove the pickit2 from the icsp.
Another queston?? how to have all of portB set as inputs?? where is the input to go to the outputs??
Been working on several other non electronic projects and been contemplating this project. Will call it plan multiplexing??
Am considering adding some 10K pullup resistors to portB.4 to B.7 and eliminate the weak pull ups.
As I mentioned, am attempting to have the keypad output to an LC D, no the usart.
 
Mrdeb,

As I have explained numerous times, the keypad module takes care of all the details. If you are using port B, you don't need pullup resistors; the built-in ones will work fine as evidenced by my working code 160 messages ago. If you'd rather use a different port for God knows what reason, then you need pullup resistors AND you need to specify the correct port for the keypad module.

Connect the keypad, add less than 5 lines to your code and it will work.

I am so sorry I didn't think to tell you to unplug the PICkit from port B while testing the code. I usually use port B with the soft UART to output results but obviously that wouldn't work, so I connected the PICkit to the UART. As someone who has laid out circuit boards, you must be aware that the ICSP connections go to port B. How clueless are you to not think "I wonder if the PICkit interferes with the keypad routine" when it didn't work?!???

You can't follow simple directions or a simple logical thought process so you jump to all kinds of irrational conclusions rather than do simple troubleshooting. The code I claimed works doesn't work for you, so rather than think "I wonder if the PICkit interferes" you start changing random code, declare that the internal pullups are faulty and wonder why with 160 messages you still got ****. Geez oh grief.

I have one more question to ask, but decorum prevents me. If anyone else would like to know the question. A question I have rigorously tested during my career, send me a message and I will share it with you. Not you MrDEB. I have given you the last bit of my time that I ever will.
 

Have you tried the excellent C code project and schematic posted?

Alot of effort went into that, obviously i am not saying Jonsea didnt put alot of effort in, but he has issues of sanity which is why he posts. So you actually have 3 verified working projects, more than enough info to drive a keypad and had every question answered 6 times 6 different ways. Now lets skip the bit where you ramble about some utterly unconnected code and get to the bit your stuck on.

Dont use your code, it isnt code its a mix of alpha numeric characters in random order, with the occasional Dim or GOTO stuck in to dress it up as code. First lets see where we are..

Does your keypad work? Can you press each key and get a reading on the multi meter? Forget the micro and its reaction, we want to know if the keypad is wired correctly and when pressed, does each button register on a multi meter?

Lets start there.
Remember the golden rule, code comes last. First we make something electrically sound and verified as working as a circuit, then we look at code. That way we know if its a software issue or not.....Ok we know its a software issue, but we dont know how many hardware issues we are looking at. Take on board what I said, your diode drops 0.6V roughly, so use two in series. yes most pics are specked to go outside the range, but its stupid to run electronic circuits on a knife edge when you dont have to.

Ironically i build in 30% margins minimum and still think i am pushing it. Learning is good, but learn it right and stop trying to take short cuts, every shortcut ever arrives at the same destination FAILURE.
 
Looks like there's some catching up to do...

I pointed out to MrDEB that he can't have the PICkit 2 connected to the ICSP connector while he's trying to read the keypad
Of course you did. And your point is????

Another queston?? how to have all of portB set as inputs?? where is the input to go to the outputs??
Huh?

Am considering adding some 10K pullup resistors to portB.4 to B.7 and eliminate the weak pull ups
And that'll get you just about right where you are now.

Have you tried the excellent C code project and schematic posted?
Are you f'ing kidding me? Are you trying to see how many posts it takes to break the forum software?
 
It would seem it is time for another redundant post of a complete working project that MrDEB will not consider as anything he could lean from.

The attached files are my schematic and the port to Swordfish BASIC done the the truly excellent tumbleweed.

This code works in this real hardware:
 

Attachments

  • 18F2520_LCD_4x4keypad.sf.zip
    33.7 KB · Views: 237
Last edited:
No i am aware exactly how many nodes the server can handle thanks. I also have a pretty good idea we are roughly at 8% inode usage tops....

But the code could be compiled real easy and burnt into the chip, that allows us to debug the unknown foof ups in the hardware we have yet to find out about . But now you mention it...Hmmmm might be fun to see h0w hard you can push the server.. Would fit with the current experiment to see how much abuse a pic 18K series can take
 
LG -
I was being sarcastic. Using 'C' and MrDEB in the same sentence is, well, I don't know... I'm at a loss for words.

In any case it doesn't end well.
 
LG -
I was being sarcastic. Using 'C' and MrDEB in the same sentence is, well, I don't know... I'm at a loss for words.

In any case it doesn't end well.
Sorry i missed it! Its real hard to catch jokes in these long, highly complex threads that stretch ones abilities to the limit. Projects like this i struggle with, i am ok with normal stuff but start using specialist parts like signal diodes that drop 1.5V and i have to concentrate.

It also feels like i am the only one trying to help! No one posts anything helpful or remotely useful! So far we only got 3 working solutions!!

Dosnt help with Dan posting strange hieroglyphics! Straight lines and everything neat! WTF we sposed to do with stuff like that?
 
Dosnt help with Dan posting strange hieroglyphics! Straight lines and everything neat! WTF we sposed to do with stuff like that?
Do what those truly dedicated to their own ideas do and ignore them. You can be so much happier. If you accept any portion then your whole view of how to do development work may change to one based not on internal wisdom of what must be true to one based on testing and critical observations.
 
Hi Dan,

Nice design. Have you considered one of the newer 18 series chips such as the 18F24K40. The newer chip has WPUs on all pins so you can move the keypad and LCD onto ports A and C and leave the ICSP connected.

I wondered on price so checked at Microchip - 18F2520 is $3.18 - 18F24K40 is $0.87. And, for another 7c you can increase the memory from 32k to 64k (25K40).

Mike.
P.S. Don't know if Swordfish supports it.
Edit, Sorry Dan. Just noticed you haven't used the ICSP pins.
 
Last edited:
What? you want me to buy a rule and do straight lines?

Excuse me but at least i try and help!
 
Some people want to do things a certain way and aren't receptive to suggestions otherwise. I am sometimes in this camp, possibly for reasons I haven't fully explained.

MrDEB most often is not in this group. He's flailing, looking for the easy solution. But if the easy solution involves words he doesn't understand, it's too complicated for him to take a little effort to understand. He also has a unique ability to skip over words to see what he wants to see.

One of his traits we haven't seen recently: through hundreds of posts, you may have drug him 90% of the way to the answer, and he'll see something that looks easier (neglecting words he doesn't understand or doesn't want to see) and toss everything in the bin and start over. Of course, the new plan is never easier and is often the same thing under the surface....but it starts a new forum topic and the cycle starts over.

But I true love when he follows my advice (more or LESS), and it becomes my fault when what's proven and tested doesn't work for him (for example, not understanding that the PICkit can't be connected was my fault for not telling him that). But no matter. He'll get no more help from me.
 

You could add it that's not that hard to do Jerry (tumbleweed) is really good at adding things to swordfish I think he's about the only one left working on the Ide.
 
Bert, the keypad module allows you to specify which port to use. You would only have to add which chips support pullups on other than port B.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…