input and save input

Status
Not open for further replies.
...maybe we could see what you really have in mind....

There's a first time for everything....

Personally, I'd use a port expander or LED driver chip than trying to solder TQFP with an iron.
 
the project could use 10 players, battery powered, 17-20
leds
looking at the 18f44K20, 25K22 & 26K22
I have a board layout but it was only 1 game option. This new project is a combination of Mexican Train and a fast version of Mexican train I call Bullet Train.
With the 2 games I need more pins since the 1 game option uses a 18f2221 with no issues (a 28 pin pic)
 
Arrange your LEDs in a 4 by 5 matrix and your keyboard in a 2 by 5 therefore only needing 11 pins for all keys and LEDs.

Mike.
 
I apprciate your input Jon. Have viewed several videos using a soldering iron and lots of flux. Since I started using Chip-Quik flux for soldering a SOIC pic, I am able to solder each pic in under 90 seconds with no solder issues.
Trying not to add more chips as the cost increases. I got lucky that I found lighted LED mom switches but at $2 each, decided to go with small tactical push-button similar to the ones on the Tap 28. In fact that's where I got the idea to use a small cheap tactical switch.
 
A 4 x 5 matrix sounds like a solution. Will research for sure.
Thanks for the idea.
 
Good luck with the K chips it's like jon said swordfish has bugs with them you'll have a hard time figuring out what the heck is wrong.
 
I did a search on the microchip site and the parametric search came up empty, only K series. I want to stay away from the K series but have used them in a project with success but not without programming issues.
Doing more searching for a better choice and hopefully not a K series. The voltage range is enticing and may have to go with a K series.
 
Good luck with the K chips it's like jon said swordfish has bugs with them
Before someone gets the wrong idea, I use swordfish with the 18F K and J series parts with no issues.

The problem is with the libraries. Many of them are written for the older parts and haven't been updated. Since libraries in swordfish are source code you just have to modify them to support your newer part.

Almost every new part Microchip does changes something. Even they quit trying to keep their libraries up to date and now force you to use their MCC code generator (which doesn't support many parts at all).

Same goes for the programmers. The pickit2/pickit3 standalone apps haven't been updated in years, so if you use a "new" part you may have issues there too. You might have to switch to the mplabx IPE/command line drivers which brings in a whole new set of problems.
 
Good point about the K-series chips and Swordfish. As I said above my "go to" chips are the 18F25K22 and 18F26K22 where I need more memory.

Swordfish is unique that the libraries are written in Swordfish. common problems with newer chips is that a register name jas changed or the pinout for a hardware function has moved. These type of problems Re usually not too difficult to resolve with some assostance from t&e dats sheet.

MrDEB's; infamous troibleshooting skills, where the syntax of an improperly formatted if/then can take 4 pages, make him a good candidate for the traditional parts.
 
Just a note!! If you do get K series.... The pic18f45k20 is a low voltage chip only( 3.3v)... The pic18f45k22 is 5v ... I got caught out with this..

P.S. If anyone needs pic18f45k20... I got loads of them.... Duh!!
 
The Proton Amicus free complier program used only the 18K25K20...maybe they didn't want it to be too successful? (They may have added the '22 after years of begging).

Ugh. I really dislike 3.3v only parts!


Tumbleweed, perhaps I should hsve said the traditional chips better suit MrDEB's unique programming style?
 
I like Pommies idea of a 4 x 5 matrix to read the switches and enable desired LED. Just need to take a closer look at implementing the idea.
thinking using byte to determine which switch has changed state.
more research to best approach
 
If more than one switch may be pressed at a time, Mik's solution won't work so well.....
 
This probably has nothing to do with what MrDEB is trying to do but he hasn't been too clear about that so who knows.

This is a random thought. MrDEB, just ignore this if it doesn't apply.

If one wanted a "buzz in" system where the first button to be pressed has control and the rest are ignored, for up to 8 switches, an MCP 23008 or MCP23017 would do all the work for you. Interupt-on-change detwcts when any switch is pressed, and one of the registers

But even if you use the MCP23017 with 16 I/O pins, you are limited to 8 switches. The chip is divided into separate halves.
 
been running over ideas and if more than one key is pressed then all bets are off.
going hunting for a LF series chip in a 44 pin smd and hopefully not a K series.
 


Hunting rabbits...I mean PICs...is a very arduous task, made even more difficult when recommendations have been made. Mike's recommendation includes EEPROM, so lets go with that just in case there turns out to be some reason you do need to save some info between games.

Mike recommended the 18F2620 or the 18F4620.

Here's the first secret you must have been ignoring on the front of the data sheet:

- 2620: 28 pin part
- 4620: 40 pin part
Only the first digit changes to go from a 28 pin part to a 40 pin part.

Stop sputtering - the TQFP package has 44 pins, but 4 of those are nc. It's exactly the same part as the 40 pin DIP package inside.

"But I want the LF version..."

Stop whining. For the baseline series, there is always an LF version.

18LF4620 should be just what you need.

So let the hunt begin. 10 seconds on Octopart and you'll know what's available. Very difficult.



But how can you be sure that's the part you really want? 2 to 4 and add L? Who believes that works? Microchip will show you it is. Note, there isn't a separate spec page for the LF version.

 
been running over ideas and if more than one key is pressed then all bets are off.

Connect your switches to Port B whether or not you use the 40 pin version. Don't design in something stupid from the start. "It got the wrong reading. I told you, only one person can press their button at a time!!!"
 
Looking at the swordfish device list:--- Funny how the pic18f4520 has been missed off the list...I very much doubt its not supported..
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…