1. 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.
    Dismiss Notice

input and save input

Discussion in 'Microcontrollers' started by MrDEB, Nov 7, 2017.

  1. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,163
    Likes:
    99
    Location:
    Seattle, WA
    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
     
  2. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,394
    Likes:
    22
    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.
     
  3. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,394
    Likes:
    22
    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.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,163
    Likes:
    99
    Location:
    Seattle, WA

    If you are building a hundred of these, a buck matters. If you are building one or ten, BFD.

    I'm done.
     
  6. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,394
    Likes:
    22
    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?)
     
  7. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,163
    Likes:
    99
    Location:
    Seattle, WA
    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.
     
  8. tumbleweed

    tumbleweed Member

    Joined:
    Jan 25, 2007
    Messages:
    60
    Likes:
    17
    Swordfish supports every 18F (and LF) device except for the new K42 and K83 parts. That's close to 440 different chips.

    http://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.SystemConvert

    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.
     
  9. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,394
    Likes:
    22
    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.
     
  10. tumbleweed

    tumbleweed Member

    Joined:
    Jan 25, 2007
    Messages:
    60
    Likes:
    17
    The 18F4520 should already be supported in the version you have... it's the default device if you don't specify one and has been for quite a while.
     
  11. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,394
    Likes:
    22
    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.
     
  12. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,394
    Likes:
    22
    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??
     
  13. tumbleweed

    tumbleweed Member

    Joined:
    Jan 25, 2007
    Messages:
    60
    Likes:
    17
    The datasheet is your friend...
    So, to turn them on use INTCON2.7 = 0
     
  14. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,084
    Likes:
    326
    Location:
    Brisbane Australia
    You should end up with a 6x5 array with 4 rows of LEDs and 2 of pushbuttons.

    Mike.
     
  15. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,829
    Likes:
    138
    Location:
    morristown,tn
    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
     
  16. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,394
    Likes:
    22
    that looks like the list I am using ? I see no 25K22
     
  17. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,394
    Likes:
    22
    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.
     
  18. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,084
    Likes:
    326
    Location:
    Brisbane Australia
    Your LEDs and push buttons will only use 11 pins. An 18 pin 18F1320 should manage this. What else do you need to connect?

    Mike.
     
    • Like Like x 1
  19. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,829
    Likes:
    138
    Location:
    morristown,tn
    I just want see the code. Reading buttons and light some leds pic maybe need a harddrive Just kidding
     
    • Like Like x 1
  20. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,251
    Likes:
    911
    Location:
    Rochdale UK
    ONLINE
    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!
     
  21. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,163
    Likes:
    99
    Location:
    Seattle, WA

    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:

    18F24K22
    18F25K22
    18F26K22

    are all the same 28 pin part with imcreasimg memory.

    18F44K22
    18F45K22
    18F46K22

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

Share This Page