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.

reverse engineering the keypad module

Status
Not open for further replies.
misunderstanding--
only 12 leds,
not more leds.
so binary is not an option? it works for led matrix stuff like 8 x 8
just curious
 
You have code developed specifically for what you're attempting to do. Do you really think anybody wants to go through a hundred more posts trying to help you do something else you don't understand?

Tumbleweed, apparently my clarifications fell on dead eyes.

I am sorry to be harsh, but take the advice you've been offered – and be grateful to those who have helped you.
 
Last edited:
OK, sucked in again. Why is binary not an option because only 12 LEDs?

Mike.

Because MrDEB has been handed working code on a silver platter, and rather than use that working code, he'd rather go another way which offers no advantages over the code he has been given and that he has proven several times over that he doesn't understand.
 
+1

MrDEB has been doing the same thing with keys and LEDs for the past 10 years.
In that time, most of the info I've provided never even gets read much less understood.

I'm done explaining anything, and simply post the answer once I nail down the question (which only takes 100 posts).
I've found that it's best to keep everything as simple as possible.

I shudder to think what would happen if a real scanning routine were added to the mix...
 
You'll both learn. Actually tumbleweed may already be educated. I remember that phrase (being educated) when I helped a lady serve icecream in a van when I was 16. Lalalalalalal..... I'll just wonder off into my daydreams.

Mike.
 
Well after lots of editing of the ledmatrix.bas so the case select agrees with the keypad12mrd.bas I now have an actual working code that the leds agree with the keypad. Nobodies fault but thanks again to Tumbleweed.
now to proceed with the next portion of this project.
 
Nobodies fault but thanks again to Tumbleweed.

What the heck. It's Nobodies(sic) fault that the LED designators (from a schematic you would not provide) don't line up with your screwball switch arrangement? How is that anybody's fault but your own???

And poor baby. "Lots of editing" which should have required typing the numbers 1 – 12 to make things match (but Lord knows how YOU did it).

Unbelievable. Trying to help you is a truly unrewarding task.
 
the schematic had nothing to do with it.
I ran the donated code and realized the leds were in sequence from left to right in the ledmatrix.bas and the keypad12 was top to bottom.
the schematic as I mentioned had nothing to do with the case select in the ledmatrix.bas.
I added in AFTER editing the ledmatrix.bas module an ISR, LCD, board reset. Still need to add a second routine to increase the speed of the leds toggling/waiting for keypress.
 
MrDEB does keep things interesting around here.

See this thread for one of the epic quests for knowledge.

I would ask MrDEB to develop more skills in posting useful documentation about projects he seeks assistance on.
 
I would ask MrDEB to develop more skills in posting useful documentation about projects he seeks assistance on.

Believe me, you are not the first person to ask. But nothing will change because MrDEB believes a 100 forum posts is standard for any code development.
 
Visitor tumbleweed Dan Soze be80be hexreader Ian Rogers
I truly admire you guy's monumental efforts and persistence in trying to help in these threads, but your frustrations are self inflicted. You know what you are getting into when you sign up!

MrDEB
In order to take full advantage of the vast wealth of knowledge and copious amount of generosity from the above members, in trying to help you solve your problems, please refer to hexreader's requests going forward:
I think it is time for:

1) Full, accurate schematic.

2) Zip file containing all code, with all include files.

3) Well lit photographs of both sides of your circuit board, so we can see if schematic matches reality.
If you can do the above whenever you have a problem, I'll bet you have the answer(s) you seek in a couple of days, rather than a couple of weeks or more.
 
If you can do the above whenever you have a problem, I'll bet you have the answer(s) you seek in a couple of days, rather than a couple of weeks or more.
If MrDEB could do those things, by now he would have.

As his approach seems to lack order and method with inevitable results of chaos and confusion.

At times it seems like I am helping a lemur paint a house. It looks like fun, but I dread the results.

MrDEB keeps trying so I have hope knowledge and success will be his reward.
 
Here is what you do not see... 3 thousand views.... This means that these threads ( albeit drawn out ) is possibly helping hundreds..

Its like the scenario in school...

The teacher finishes the lecture / lesson and asks. " Anyone who doesn't follow, please raise your hands"..
No one does because the fear of looking stupid..
If someone does raise the hand and audibly cries "No!! I'm sorry, I do not follow"..
There will be a huge sigh of relief because MANY will not follow...

MrDeb can carry on until hell freezes over for all I care.... As long as I can help, I will..
 
.. 3 thousand views.... This means that these threads ( albeit drawn out ) is possibly helping hundreds....

I don't think helping is the right word. Entertaining perhaps. Like watching a train wreck.

When I am researching something in a forum, I have usually found that a thread with many posts doesn't contain a wealth of knowledge. In fact, any substantive knowledge there may be isn't worth the effort required to sort through the chaff. This is especially true where anyone who replies has learned that detailed explanations are a waste of effort.
 
Here is what you do not see... 3 thousand views.... This means that these threads ( albeit drawn out ) is possibly helping hundreds..
<SNIP>
Of those 3 thousand views, how many are attributed to members who contribute/religiously follow these threads, vs non-members, crawlers and bots?
Personally, I read this forum multiple times a day, from 3 different devices.
Notifications are turned on, so I will pop in and have a look each time there is a new post. (Obviously, a few running replies may rack up overnight)
Do each of these single visits add to the total tally of thread views?
If so, I'll bet that I personally have perhaps 40+ views on this thread alone.
And the same maybe goes for you and the rest of the guys helping...

If views are all that counts here, then have at it.

Personally, I would much prefer that MrDEB gets maximum value out of his experience here, but in order for that to happen he needs to throw the guys, who are helping, a bone. Not just the crumpled up piece of packaging that the meat came in, as is usually the case.

How many times do we see, on this forum, a 2nd post to an OP's thread saying something like "What exactly are you trying to achieve? Provide your code/schematics/pcb layout, otherwise, we have no idea what you are trying to do." Sometimes, what is required materializes and the thread progresses quickly, other times it's just crickets.
In MrDEB's case, it's clearly evident that none of the members here want to see him fail, because if that were so, they would simply not respond.
But respond they do, despite the cryptic descriptions and project objectives.

If I could help out with the code side of things I would, but despite my aspirations, I am simply not wired that way.....so all I can offer in way of help is how to seek advice, perhaps something like this:
MrDEB
Lay out the full details of your project and the intended goal.
List the hardware used and the attached devices, such as switches/sensors/displays etc.
Post your code and note the included libraries, whether they are used as standard, or have been modified in some way....
Post schematics and PCB pics.
List what works as intended, and what does not.
Then stop and wait for advice.

E.G.
'I am creating an ultrasonic distance measuring device, using PIC18F46K22, 2x16 HD44780 LCD, a tact switch and an HC-SR04 module.'
'I am using Swordfish Basic and including the standard libraries for the LCD and HC-SR04, pin connections are as per the libraries'........or;
'I am using Swordfish Basic and including the standard libraries for the LCD and HC-SR04, but due to PCB routing, pin connections have been changed and are as follows;......blah'
'Here is my code:'
'Here is my schematic.'
'Here are pics of both sides of my PCB.'
1. 'The LCD powers up fine and displays "Distance" correctly on the first line of the LCD, but when the tact switch is pressed, the 2nd line on the LCD, which should display the actual measured distance, is only showing half of what is measured.'........or;
2. 'The LCD backlight is on, but nothing is actually displayed, turning the contrast pot makes a difference and squares can be seen.'.......or;
3. 'Initially it works when I supply 5V from my bench PSU, but when I press the tact switch, the current-limiting kicks in '

All of the above may give a pretty clear indication as to where a problem is likely to reside, provided that information is supplied initially.
1. The LCD display is initialized correctly, but TOF (Time Of Flight) is probably incorrectly calculated in the code.
2. The LCD receives power, but is likely not initialized correctly in the code, or the data lines are incorrectly connected/addressed.
3. The tact switch could possibly be creating a short when pressed, or the current-limiting of the PSU is maybe set too low..

There are so many points to be addressed when a concern arises which requires some troubleshooting, and all other branches have their own interdependences. The members here are freely giving of their personal time, in order to whittle down potential sources of another member's problem.

In short, what I think I am trying to say to MrDEB, is something along the lines of "Please help us to help you."
Garbage in = garbage out.....Please turn it around.
 
Mickster brings up some great points. But I don't think that MrDEB doesn't share this information. I believe he doesn't think things through from start to finish and understand the important details.

Some Suggestions

When designing a microcontroller project where you will be using code modules developed by others, understand how the module is designed to work.
□ Is it designed to work with a specific port?
□ Is it designed to work with specific Port pins?
□ What configuration does it expect? For an LED or switch matrix, what is the row × column arrangement.
□ What polarity is needed for LEDs and the like.
□ Are pullup resistors, diodes, etc. required?

After all the requirements of a module are understood, then create a schematic. Check the logical arrangement of components. If the LEDs or switches numbered from top to bottom in column 1, the rest of the columns should follow the same order. If you copy and paste a block of a schematic, the designators may not end up in the order you expect.

Be sure to include decoupling caps in the schematic – every chip should have at least one.

When the schematic is done, go back and check it against the module. Does the order of the LEDs and switches agree with the expected order? Columns vs rows are as the should be?

Then check the schematic against any parts you aren't intimately familiar with. Enable and other pins pulled properly high or low? Any special bypass caps and resistors included? ALL of the power and ground pins connected?

Then think the software through. Anything you've forgotten? Do you need another switch or LED for some reason? You don't have to write the code at this point, but work your way through what the board is supposed to do and see if anything is missing.

After ALL of the above, you can start to lay out a circuit board....unless you are planning on putting it in an enclosure. If this is the case, figure out what enclosure you're going to use. Size the board to fit leaving some clearance at the edges. Locate holes for mounting screws to fit the enclosure. Determine where switches, pots, LEDs and connectors will go. For connectors, determine the enclosure wall thickness so the the connectors will be flush to the surface. Trust me, if you don't design to fit a particular enclosure, you will not find one that's going to work well with your circuit board.

Now you can start on a circuit board.
 
Status
Not open for further replies.

Latest threads

Back
Top