pic24f16kl401dip20.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. """
  2. # TOP2049 Open Source programming suite
  3. #
  4. # Microchip PIC24F16KL401DIP20
  5. #
  6. # Copyright (c) 2014 Pavel Stemberk <stemberk@gmail.com>
  7. #
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License along
  19. # with this program; if not, write to the Free Software Foundation, Inc.,
  20. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  21. """
  22. from .microchip16_common import *
  23. from .configWords import klx0x_fuseDesc
  24. class Chip_Pic24f16kl401dip20(Chip_Microchip16_common):
  25. voltageVDD = 3.3
  26. voltageVPP = 8
  27. logicalFlashProgramMemorySize = 0x800000
  28. logicalFlashConfigurationMemorySize = 0x800000
  29. def __init__(self):
  30. Chip_Microchip16_common.__init__(self,
  31. chipPackage="DIP20",
  32. chipPinVCC=20,
  33. chipPinsVPP=1,
  34. chipPinGND=19,
  35. signature=b"\x1e\x4b",
  36. # flashPageSize (in number of 24bit words)
  37. flashPageSize=0x2bfe // 2 + 2,
  38. # flashPageSize=0x40,
  39. flashPages=1,
  40. # eepromPageSize (in 16bit words)
  41. eepromPageSize=0x100,
  42. eepromPages=1,
  43. # all 7 words uses lowest byte only
  44. fuseBytes=2 * 9
  45. )
  46. self.configWordAddr = 0xF80000
  47. # self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
  48. fuseDesc = klx0x_fuseDesc
  49. ChipDescription(
  50. Chip_Pic24f16kl401dip20,
  51. bitfile="microchip16dip14dip20",
  52. chipID="pic24f16kl401dip20",
  53. runtimeID=(0xDF01, 0x01),
  54. chipVendors="Microchip",
  55. description="PIC24F16KL401",
  56. packages=(("DIP20", ""),),
  57. fuseDesc=fuseDesc,
  58. maintainer="Pavel Stemberk <stemberk@gmail.com>",
  59. )