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.

reading a 4x4 switch matrix

Status
Not open for further replies.
I have the HI-TECH PICC18 compiler in PRO mode. It can build the same projects as XC8.
The HI-TECH PICC18 PRO project compiles to 1495 program bytes and 52 variable bytes
With a little optimization here and there I got the SwordfishSE version down to 1477 program bytes and 71 variable bytes.
Swordfish reserves 24 bytes for its internal use, so if you account for that it reduces the variable usage down to 71-24=47 bytes.

That includes the LCD_WriteString() routine.
 
They removed all the libraries I got tons of code and the dam libraries are gone
 
That's the 18 f libs I got a book years ago it use the one for 12f and 16 f chips I lost my hard drive . I kind give up on it now learning xc8 and write it all from beginning. problem i have now is I don't think right like I once did. LOL
 
problem i have now is I don't think right like I once did. LOL

Burt hate to tell you this mate but........... I think its just a case of you only just noticed :p, standing here i dont see no change :joyful:.

Mr Deb.
We will forget you ever suggested I would waste 4 hours of my life playing a game when i could be in the lab or workshop!

So forgive me for asking, and i apologize to everyone in advance for bringing this up, but why not give everyone a key pad? and link to one calculator? display the results on a small screen instead of a LCD. We wont go the blue tooth route, but you could even use rs232 to display the results on a tiny monitor.

If you used two ADC Pins for the first keypad, then one of the pins used has a fixed resistor going to VDD , that way you get effectively a voltage divider.
So lets say the keypad has 4 row pins and 4 column pins, at the end of each of these pins you put a resistor of different value. Read the second ADC pin and the voltage tells you what key was pressed, each keypad then only use a different ADC channel to tell you which play pressed which key.....

I think my explanation is going to need a schematic isnt it...
 
I want to make this as simple and cost effective as possible.
As for the game hubs, I have sold the present version for $20 each. The switches are what kills the price. The lighted switches cost $1.80 each thus the new version uses a simple tactile switch and 1206 led thus lowering the price significantly. The other issue's are the location of the battery enclosure and needing an enclosure so when a switch is pressed the board does not tip with the battery mounted on the bottom. The newer version has corrected all present issues.
 
here is the shipment on its way. This is the two game version
 

Attachments

  • shiped order.jpg
    shiped order.jpg
    135.4 KB · Views: 154
back to the 4 x 4 matrix. Looking at what I have on the schematic and only needing 8 pins for switch matrix, 6 for the LCD 2 pins for Vdd and grd maybe look at using an 18 or 28 pin pic.
Ordered 5 LCDs from China so need to stick with 5v chip, no K's allowed. Memory needed is to be determined after I get my code done and tested.
 
Oh. I suppose you are just covering your costs then. Considering the inordinate amount of help people give you on all of your projects, those people helping you might feel a bit used and abused if you were profiting because of their efforts.
 
You need to check your facts Jack. The POS 18F25k20 is one of the few k series that's limited to 3.3 volts.
Funny though... I ran mine for 3 months before I noticed it was a 3.3v device... It ran at 5v just fine... I swapped to the K22 which was 5v..
 
When Amicus (Proton Basic?) came out in the free version supporting only the 18F25k20, there was a huge amount of criticism. I think eventually they added the K22, but that was a year or more after it came out.

That was a very strange group of people - the members of the forum, even for the open, free Amicus version, were very suspicious and distrusting. A friend gave me a Proton dev board, and when I asked in the forum if a schematic was available, the response was hostile. If I had the board "legitimately", I would have a schematic, so obviously, I was lying to get a schematic so I could steal the design. When my remarks didn't conform to the party line, my account and every message I had ever posted disappeared. When challenged on it the response was "That didn't happen, or if it did, somebody made a mistake." That left a lot of forum threads of somebody asking a question, with the next message being "Thanks. That's exactly what I needed to do." ;)
 
back to the 4 x 4 matrix. Looking at what I have on the schematic and only needing 8 pins for switch matrix, 6 for the LCD 2 pins for Vdd and grd maybe look at using an 18 or 28 pin pic.
Ordered 5 LCDs from China so need to stick with 5v chip, no K's allowed. Memory needed is to be determined after I get my code done and tested.
I hesitate to suggest this but someone with much more patience than me might be able to help you multiplex four of the keypad matrix lines with four of the LCD lines.

Cheerful regards, Mike

muxed.png
 
Last edited:
I have deleted my post.

I had no idea you had been selling the things you made, it makes sense now why you moan about 28p for a crystal. i thought maybe you were just really broke, i didnt realize you were thinking of your profit margin......

Every time i reply in this post it turns into a rant and i delete!! So all i am going to say is.

Make sure you put a big thank you on those boards to Jonsea etal without whom you would be selling dead bits of black plastic that take a car battery to power up.
 
I had no idea you had been selling the things you made, it makes sense now why you moan about 28p for a crystal. i thought maybe you were just really broke, i didnt realize you were thinking of your profit margin......

28 pence counts if you're making hundreds of them; if you're making 10, it's not so important. And the cost has to be weighed again all the forum pages when it doesn't work because something was set up wrong!


Regarding multiple LCD displays, a number of displays can be connected in parallel with separate pins driving the E(nable) pin of each display. But I think maybe MrDEB intends the calculators to be stand alone? Explaining what he's trying to do has never been a strong point!

Related to sharing the LCDs, years ago I connected 2 parallel printers to a single interface. If either printer was switched on, it worked great - totally transparent to operation. But if I forgot and switched both printers on, they were very polite and worked together. One would print a line, and the other the next line!
 
But if I forgot and switched both printers on, they were very polite and worked together. One would print a line, and the other the next line!

Tree KILLER! :troll::woot:
 
I am not making a profit but more at a loss. I am enjoying learning different aspects of programming a pic. No schooling, and very little electronics schooling as well. Have always been interested in electronics, had one year in high school but we are talking 1968, way before microcontollers came out.. its all from the input I get from the web.
As for thanks, I have thanked every time I can.
 
Funny though... I ran mine for 3 months before I noticed it was a 3.3v device... It ran at 5v just fine... I swapped to the K22 which was 5v..

I still say they hand pick the low voltage chips and a pic is a hard chip to break I forgot and powered a 16f505 at 12 volts it still runs and you could of made eggs on it before I unplugged It.

I'll go one more I got one of the first pic 32 it was 3.3 volt I thought I killed it with my pickit2 I forgot to set for 3.3 volts that was a no no for the chip.
I found it a week ago and put it in my microstick 2 it works fine.

There way more forgiving then some avr's I've used they die very fast.
 
Status
Not open for further replies.

Latest threads

Back
Top