• 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.

input and save input


Well-Known Member
Darn it. I was going to check the 18F4620 and the 18F4520 in Swordfish, but I forgot. It's still early here.

Fortunately, both are included. BTW MrDEB - we have been over before that functionally, the LF version is the same as the F version; you don't put the L in the device specification in Swordfish.

SF 4520.jpg SF 4620.jpg


Well-Known Member
Thread starter #42
Thanks Jon, never heard of octapart??
been comparing parts with the swordfish supported list and looking at price which is a consideration as well.
It was suggested by ? to look at the 18f46K20 which sells for $3.06 the 18f44K20 for $2.55.
One big issue is they are both K series which appear to be cheaper in price.
Need to look further at the 4620 but I don't see the 4520 on my supported list? maybe an outdated list?
been looking at the Microchip site and have yet delve into the baseline section.


Well-Known Member
Thread starter #43
found Octapart, handy site, thanks
did some looking at differences between the 18LF4620 and the 18F4620
the LF version is slightly higher in price but Vdd is 2.0-5.5v where as the 18F4620 Vdd is 4.2 - 5.5v
Its looking like the 18LF4620 may be the rabbit I am looking for seeing how the K series is cheaper but more headaches.


Well-Known Member
Thread starter #45
Only building 10 but attempting to control cost vers head achs so the 18LF4620 if Swordfish supports.
Won't know for sure until I order a dip version and pro-type it to determine it works as desired. If it doesn't the go with the 18F4620 version
Ordering 2 of each 18lf4620, 18f4620 and an 18f46k22 (the 46K20 dosen't show it being supported by swordfish?)


Well-Known Member
You know, I really thinking trying to help you is a colossal waste of time.

I said in messages above that the F and and LF versions of a chip are functionally identical. These is absolutely no reason to think software will operate differently on the two.

I also showed above that the 18F4520 and 18F4620 are supported in Swordfish. And before you ask the question, I also explained that you do not need to specify (and indeed, cannot specify) the LF type as the device in Swordfish, because they are functionally exactly the same.

I will leave you to your studying and dissecting since they have served you so well in the past.
Swordfish supports every 18F (and LF) device except for the new K42 and K83 parts. That's close to 440 different chips.


There's a zip file at the bottom of that page that has the device files if you don't want to build them yourself.

As Jon says there's no functional difference programming-wise between an F and an LF part. If you use the utility you can create files for the LF (but they're pretty much identical).
The K series parts will be cheaper, and probably require less current than the older parts.


Well-Known Member
Thread starter #48
As I mentioned before the supported list I printed out was / is outdated and the 18f4520 is not on that list.
Will download etc. tumbleweeds suggestion. As for LF I realize the only time one needs to specify the LF is when one order's said part. The big difference is the spec on the Vdd.
Started a basic schematic and going yto use Mikes suggestion and utilize a matrix on the 10 leds.


Well-Known Member
Thread starter #50
Am / WAS going by the list I downloaded from the Swordfish site.
Looking at a different device, I have several 18LF4520's sitting in front of me so instead of purchasing new for testing code, will just test with what I have. Beside the device is cheaper by couple of dollars.


Well-Known Member
Thread starter #51
While redrawing a schematic, I have lots of 10K resistors connected to the switches then realized why not use the internal pull-up resistors but enabling them??
Looked on the swordfish site as well as DDIY but come up empty. HOW to enable??
The datasheet is your friend...
Each of the PORTB pins has a weak internal pull-up. A
single control bit can turn on all the pull-ups. This is
performed by clearing bit, RBPU (INTCON2<7>). The
weak pull-up is automatically turned off when the port
pin is configured as an output. The pull-ups are
disabled on a Power-on Reset.
So, to turn them on use INTCON2.7 = 0


Well-Known Member
The following devices are currently supported.

18F1230, 18F1320, 18F1330, 18F13K22, 18F13K50, 18F14K50, 18F2220, 18F2221, 18F2320, 18F2331, 18F23K20, 18F23K22, 18F2410, 18F242, 18F2423, 18F2431, 18F2439, 18F2450, 18F2455, 18F248, 18F2480, 18F24J10, 18F24J11, 18F24J50, 18F24K22, 18F2510, 18F2515, 18F252, 18F2520, 18F2525, 18F2539, 18F2550, 18F2553, 18F258, 18F2585, 18F25J10, 18F25J11, 18F25J50, 18F25K20, 18F25K80, 18F2610, 18F2620, 18F2680, 18F2682, 18F26J11, 18F26J13, 18F26J50, 18F26J53, 18F26K20,18F26K80, 18F27J13, 18F27J53, 18F4220, 18F4221, 18F4321, 18F4331, 18F43K20, 18F43K22, 18F4410, 18F4420, 18F4423, 18F4431, 18F4439, 18F4450, 18F4458, 18F448, 18F4480, 18F44J10, 18F44J11, 18F44K20, 18F44K22, 18F4510, 18F4515, 18F452,18F4523, 18F4525, 18F4539, 18F4550, 18F4553, 18F4580, 18F4585, 18F45J10, 18F45J11, 18F45J50, 18F45K22, 18F45K80, 18F4610, 18F4620, 18F4680,18F4685, 18F46J11, 18F46J13, 18F46J50, 18F46J53, 18F46K22, 18F46K80, 18F47J13, 18F47J53, 18F6310, 18F6393, 18F63J11, 18F63J90, 18F6410, 18F6490, 18F64J11, 18F64J90, 18F6520, 18F6525, 18F6527, 18F65J10, 18F65J11, 18F65J15, 18F65J50, 18F65J90, 18F65K80, 18F65K90, 18F6620, 18F6621, 18F6622, 18F6628, 18F6680, 18F66J10, 18F66J11, 18F66J15, 18F66J50, 18F66J55, 18F66J60, 18F66J65, 18F66J90, 18F66K22, 18F66K80, 18F66K90, 18F6720, 18F6722, 18F67J10, 18F67J11, 18F67J50, 18F67J60, 18F67J90, 18F67K22, 18F67K90, 18F8310, 18F8390, 18F8393, 18F83J90, 18F8410, 18F8490, 18F8493, 18F84J11, 18F8520, 18F8525, 18F8527, 18F8585, 18F85J10, 18F85J15, 18F85J50, 18F85J90, 18F85K22, 18F85K90, 18F8621, 18F8622, 18F8627, 18F8628, 18F8680, 18F86J11, 18F86J15, 18F86J16, 18F86J50, 18F86J55, 18F86J65, 18F86J72, 18F86J90, 18F86J93, 18F86K22,18F8720, 18F8722, 18F8723, 18F87J10, 18F87J11, 18F87J60, 18F87J72, 18F87J90, 18F87J93, 18F87K22,18F96J60, 18F96J65 and 18F97J60


Well-Known Member
Thread starter #56
Egads!! I have a preliminary schematic and have only 4 pins left over. Going to refine and clean up. Looking for mistakes etc and mapping out what pins do what then experiment and debug the different code sections. Hopefully get all done by January 1st if I am lucky.
Using a 2 x 5 matrix for the leds and contemplating a 2 x 5 matrix for the switches as well. Thanks Mike for the idea of using a matrix.


Well-Known Member
Most Helpful Member
Your LEDs and push buttons will only use 11 pins. An 18 pin 18F1320 should manage this. What else do you need to connect?


Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
that looks like the list I am using ? I see no 25K22
But there is a pic18f45k22 which is the same device but has more pins... So as I said ages ago... Just missed off the list!


Well-Known Member
But there is a pic18f45k22 which is the same device but has more pins... So as I said ages ago... Just missed off the list!

I also mentioned it and the 18F26k22 are my go to chips. I am using them for almost everything, including several commercial products.

I would hazard a guess the MrDEB does not understand the Microchip convention:


are all the same 28 pin part with imcreasimg memory.


are the same parts with the same memory as above, with 40 or 44 pins.

Latest threads

EE World Online Articles