pic16lf1904dip40.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. """
  2. # TOP2049 Open Source programming suite
  3. #
  4. # Microchip PIC16LF1904 dip40
  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_Pic16LF1904dip40(microchip8_splittedPMarea_hasResetPC):
  24. nLatches = 8
  25. def __init__(self):
  26. microchip8_splittedPMarea_hasResetPC.__init__(self,
  27. chipPackage="dip40",
  28. chipPinVCC=32,
  29. chipPinsVPP=1,
  30. chipPinGND=31,
  31. signature=b"\x81\x2c",
  32. flashPageSize=0x1000,
  33. flashPages=1,
  34. eepromPageSize=0,
  35. eepromPages=0,
  36. fuseBytes=4
  37. )
  38. fuseDesc = (
  39. BitDescription(0, "FOSC[0], 00=INTOSC, 11=ECH - High power mode"),
  40. BitDescription(1, "FOSC[1]"),
  41. BitDescription(2, "Unused"),
  42. BitDescription(3, "WDTE[0], 00=WDT disabled, 11=WDT enabled"),
  43. BitDescription(4, "WDTE[1]"),
  44. BitDescription(5, "nPWRTE"),
  45. BitDescription(6, "MCLRE, 1=nMCLR/Vpp pin is nMCLR, weak pull-up enabled, ignored if LVP=1 "),
  46. BitDescription(7, "nCP 1=program memory code protection is disabled"),
  47. BitDescription(8, "Unused"),
  48. BitDescription(9, "BOREN[0], 00=BOR disabled"),
  49. BitDescription(10, "BOREN[1]"),
  50. BitDescription(11, "nCLKOUTEN, 0=CLKOUT is enabled on CLKOUT pin"),
  51. BitDescription(12, "Unused"),
  52. BitDescription(13, "Unused"),
  53. BitDescription(14, "NA"),
  54. BitDescription(15, "NA"),
  55. BitDescription(16, "WRT[0], 11=Write protection off"),
  56. BitDescription(17, "WRT[1]"),
  57. BitDescription(18, "Unused"),
  58. BitDescription(19, "Unused"),
  59. BitDescription(20, "Unused"),
  60. BitDescription(21, "Unused"),
  61. BitDescription(22, "Unused"),
  62. BitDescription(23, "Unused"),
  63. BitDescription(24, "Unused"),
  64. BitDescription(25, "STVREN, 1=Stack overflow or underflow will cause a reset"),
  65. BitDescription(26, "BORV"),
  66. BitDescription(27, "nULPBOR, 1= Ultra low-power BOR is disabled"),
  67. BitDescription(28, "nDEBUG, 0=ICSPCLK and ICSPDAT are dedicated to the debugger"),
  68. BitDescription(29, "LVP 1=Low-voltage programming enabled"),
  69. BitDescription(30, "NA"),
  70. BitDescription(31, "NA"),
  71. )
  72. ChipDescription(
  73. Chip_Pic16LF1904dip40,
  74. bitfile="microchip01dip40a",
  75. chipID="pic16lf1904dip40",
  76. runtimeID=(0xDE08, 0x01),
  77. chipVendors="Microchip",
  78. description="PIC16LF1904",
  79. packages=(("dip40", ""),),
  80. fuseDesc=fuseDesc,
  81. maintainer="Pavel Stemberk <stemberk@gmail.com>",
  82. )