pic16f630dip14.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. """
  2. # TOP2049 Open Source programming suite
  3. #
  4. # Microchip PIC16F630 DIP14
  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 import *
  23. class Chip_Pic16F630dip14(microchip8_splittedPMarea):
  24. voltageVDD = 5
  25. voltageVPP = 9
  26. userIDLocationSize = 4
  27. hasEEPROM = True
  28. CMD_BEGIN_INTERNALLY_TIMED_PROGRAMMING = 0x08
  29. delayTinternalProgPM = 0.002
  30. delayTinternalProgDM = 0.005
  31. def __init__(self):
  32. microchip8_splittedPMarea.__init__(self,
  33. chipPackage="DIP14",
  34. chipPinVCC=1,
  35. chipPinsVPP=4,
  36. chipPinGND=14,
  37. signature=b"\x08\x27",
  38. flashPageSize=0x400, # 1024 words
  39. flashPages=1,
  40. eepromPageSize=128,
  41. eepromPages=1,
  42. fuseBytes=2
  43. )
  44. self.configWordAddr = 0x2007
  45. self.osccalAddr = self.flashPageSize - 1
  46. fuseDesc = (
  47. BitDescription(0, "FOSC[0], 0=LP, 100=INTOSC"),
  48. BitDescription(1, "FOSC[1]"),
  49. BitDescription(2, "FOSC[2]"),
  50. BitDescription(3, "WDTE, 0=WDT disabled, 1=WDT enabled"),
  51. BitDescription(4, "nPWRTE"),
  52. BitDescription(5, "MCLRE"),
  53. BitDescription(6, "BODEN, 0=BOD disabled"),
  54. BitDescription(7, "nCP 1=program memory code protection is disabled"),
  55. BitDescription(8, "nCPD, 1=data memory code protection is disabled"),
  56. BitDescription(9, "Unused"),
  57. BitDescription(10, "Unused"),
  58. BitDescription(11, "Unused"),
  59. BitDescription(12, "BG[0], Band Gap Calibration bits, 00 = Lowest band gap voltage"),
  60. BitDescription(13, "BG[1]"),
  61. )
  62. ChipDescription(
  63. Chip_Pic16F630dip14,
  64. bitfile="microchip01dip14dip20",
  65. chipID="pic16F630dip14",
  66. runtimeID=(0xDE03, 0x01),
  67. chipVendors="Microchip",
  68. description="PIC16F630, PIC16F676",
  69. packages=(("DIP14", ""),),
  70. fuseDesc=fuseDesc,
  71. maintainer="Pavel Stemberk <stemberk@gmail.com>",
  72. )