pic16f84asip6.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #
  2. # THIS FILE WAS AUTOGENERATED BY makeSip6.py
  3. # Do not edit this file manually. All changes will be lost.
  4. #
  5. """
  6. # TOP2049 Open Source programming suite
  7. #
  8. # Microchip PIC16F84 SIP6
  9. #
  10. # Copyright (c) 2013 Pavel Stemberk <stemberk@gmail.com>
  11. #
  12. # This program is free software; you can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; either version 2 of the License, or
  15. # (at your option) any later version.
  16. #
  17. # This program is distributed in the hope that it will be useful,
  18. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. # GNU General Public License for more details.
  21. #
  22. # You should have received a copy of the GNU General Public License along
  23. # with this program; if not, write to the Free Software Foundation, Inc.,
  24. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  25. """
  26. from .microchip8_splittedPMarea import *
  27. class Chip_Pic16F84asip6(microchip8_splittedPMarea):
  28. CMD_BEGIN_ERASE_PROGRAMMING_CYCLE = 0x8
  29. CMD_BEGIN_PROGRAMMING_ONLY_CYCLE = 0x18
  30. voltageVDD = 5
  31. voltageVPP = 13
  32. delayTinternalProgPM = 0.004
  33. userIDLocationSize = 4
  34. hasEEPROM = True
  35. def __init__(self):
  36. microchip8_splittedPMarea.__init__(self,
  37. chipPackage = "DIP10",
  38. chipPinVCC = 9,
  39. chipPinsVPP = 10,
  40. chipPinGND = 8,
  41. signature=b"\x60\x05",
  42. flashPageSize=0x200,
  43. flashPages=1,
  44. eepromPageSize=64,
  45. eepromPages=1,
  46. fuseBytes=2
  47. )
  48. def sendWriteFlashInstr(self):
  49. '''
  50. '''
  51. self.sendCommand(0, 0, 0, self.CMD_BEGIN_PROGRAMMING_ONLY_CYCLE)
  52. self.top.cmdDelay(self.delayTinternalProgDM)
  53. def sendWriteFlashInstrDM(self):
  54. self.sendWriteFlashInstr()
  55. def bulkErasePGM(self):
  56. self.sendCommand(0, 0, 0, self.CMD_BULK_ERASE_PGM)
  57. self.sendCommand(0, 0, 0, self.CMD_BEGIN_PROGRAMMING_ONLY_CYCLE)
  58. self.top.cmdDelay(self.delayTera) # Tera
  59. def bulkEraseDM(self):
  60. self.sendCommand(0, 0, 0, self.CMD_BULK_ERASE_DM)
  61. self.sendCommand(0, 0, 0, self.CMD_BEGIN_PROGRAMMING_ONLY_CYCLE)
  62. self.top.cmdDelay(self.delayTera) # Tera
  63. fuseDesc = (
  64. BitDescription(0, "FOSC[0], 00=LP osc, 01=XT osc"),
  65. BitDescription(1, "FOSC[1], 10=HS osc, 11=RC osc"),
  66. BitDescription(2, "WDTEN, 1=WDT enabled"),
  67. BitDescription(3, "nPWRT"),
  68. BitDescription(4, "nCP"),
  69. BitDescription(5, "nCP"),
  70. BitDescription(6, "nCP"),
  71. BitDescription(7, "nCP"),
  72. BitDescription(8, "nCP"),
  73. BitDescription(9, "nCP"),
  74. BitDescription(10, "nCP"),
  75. BitDescription(11, "nCP"),
  76. BitDescription(12, "nCP"),
  77. BitDescription(13, "nCP"),
  78. )
  79. ChipDescription(
  80. Chip_Pic16F84asip6,
  81. bitfile = "microchip01sip6",
  82. chipID="pic16f84asip6",
  83. runtimeID = (0xDE05, 0x01),
  84. chipVendors="Microchip",
  85. description = "PIC16F84A, PIC16LF84A - ICD",
  86. packages = (("DIP10", ""), ),
  87. fuseDesc=fuseDesc,
  88. maintainer="Pavel Stemberk <stemberk@gmail.com>",
  89. )