pic16f1828dip20.py 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. """
  2. # TOP2049 Open Source programming suite
  3. #
  4. # Microchip PIC16F1828 DIP20
  5. #
  6. # Copyright (c) 2013 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 .microchip8_splittedPMarea_hasResetPC import *
  23. class Chip_Pic16F1828dip20(microchip8_splittedPMarea_hasResetPC):
  24. nLatches = 32
  25. rowSize = 32
  26. hasEEPROM = True
  27. def __init__(self):
  28. microchip8_splittedPMarea_hasResetPC.__init__(self,
  29. chipPackage="DIP20",
  30. chipPinVCC=1,
  31. chipPinsVPP=4,
  32. chipPinGND=20,
  33. signature=b"\x43\x27",
  34. flashPageSize=0x1000,
  35. flashPages=1,
  36. eepromPageSize=256,
  37. eepromPages=1,
  38. fuseBytes=4
  39. )
  40. fuseDesc = (
  41. BitDescription(0, "FOSC[0], 0=LP, 100=INTOSC"),
  42. BitDescription(1, "FOSC[1]"),
  43. BitDescription(2, "FOSC[2]"),
  44. BitDescription(3, "WDTE[0], 00=WDT disabled, 11=WDT enabled"),
  45. BitDescription(4, "WDTE[1]"),
  46. BitDescription(5, "nPWRTE"),
  47. BitDescription(6, "MCLRE, 1=nMCLR/Vpp pin is nMCLR, weak pull-up enabled, ignored if LVP=1 "),
  48. BitDescription(7, "nCP 1=program memory code protection is disabled"),
  49. BitDescription(8, "nCPD, 1=data memory code protection is disabled"),
  50. BitDescription(9, "BOREN[0], 00=BOR disabled"),
  51. BitDescription(10, "BOREN[1]"),
  52. BitDescription(11, "nCLKOUTEN, 0=CLKOUT is enabled on CLKOUT pin"),
  53. BitDescription(12, "IESO, 0=Internal/External Switchover mode is disabled"),
  54. BitDescription(13, "FCMEM, 0=Fail-Safe Clock Monitor is disabled"),
  55. BitDescription(14, "NA"),
  56. BitDescription(15, "NA"),
  57. BitDescription(16, "WRT[0], 11=Write protection off"),
  58. BitDescription(17, "WRT[1]"),
  59. BitDescription(18, "Unused"),
  60. BitDescription(19, "Unused"),
  61. BitDescription(20, "Unused"),
  62. BitDescription(21, "Unused"),
  63. BitDescription(22, "Unused"),
  64. BitDescription(23, "Unused"),
  65. BitDescription(24, "PLLEN, 0=4xPLL disabled"),
  66. BitDescription(25, "STVREN, 1=Stack overflow or underflow will cause a reset"),
  67. BitDescription(26, "BORV"),
  68. BitDescription(27, "Unused"),
  69. BitDescription(28, "nDEBUG, 0=ICSPCLK and ICSPDAT are dedicated to the debugger"),
  70. BitDescription(29, "LVP 1=Low-voltage programming enabled"),
  71. )
  72. ChipDescription(
  73. Chip_Pic16F1828dip20,
  74. bitfile="microchip01dip14dip20",
  75. chipID="pic16f1828dip20",
  76. runtimeID=(0xDE03, 0x01),
  77. chipVendors="Microchip",
  78. description="PIC16F1828, PIC16LF1828",
  79. packages=(("DIP20", ""),),
  80. fuseDesc=fuseDesc,
  81. maintainer="Pavel Stemberk <stemberk@gmail.com>",
  82. )