atmega8dip28.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. """
  2. # TOP2049 Open Source programming suite
  3. #
  4. # Atmel Mega8 DIP28 support
  5. #
  6. # Copyright (c) 2009-2010 Michael Buesch <m@bues.ch>
  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 .atmega_common import *
  23. class Chip_ATMega8DIP28(Chip_ATMega_common):
  24. def __init__(self):
  25. Chip_ATMega_common.__init__(self,
  26. chipPackage = "DIP28",
  27. chipPinVCC = 7,
  28. chipPinsVPP = 1,
  29. chipPinGND = 8,
  30. signature = b"\x1E\x93\x07",
  31. flashPageSize = 32,
  32. flashPages = 128,
  33. eepromPageSize = 4,
  34. eepromPages = 128,
  35. fuseBytes = 2)
  36. fuseDesc = (
  37. BitDescription(0, "CKSEL0"),
  38. BitDescription(1, "CKSEL1"),
  39. BitDescription(2, "CKSEL2"),
  40. BitDescription(3, "CKSEL3"),
  41. BitDescription(4, "SUT0"),
  42. BitDescription(5, "SUT1"),
  43. BitDescription(6, "BODEN"),
  44. BitDescription(7, "BODLEVEL"),
  45. BitDescription(8, "BOOTRST"),
  46. BitDescription(9, "BOOTSZ0"),
  47. BitDescription(10, "BOOTSZ1"),
  48. BitDescription(11, "EESAVE"),
  49. BitDescription(12, "CKOPT"),
  50. BitDescription(13, "SPIEN"),
  51. BitDescription(14, "WDTON"),
  52. BitDescription(15, "RSTDISBL"),
  53. )
  54. lockbitDesc = (
  55. BitDescription(0, "LB1"),
  56. BitDescription(1, "LB2"),
  57. BitDescription(2, "BLB01"),
  58. BitDescription(3, "BLB02"),
  59. BitDescription(4, "BLB11"),
  60. BitDescription(5, "BLB12"),
  61. BitDescription(6, "Unused"),
  62. BitDescription(7, "Unused"),
  63. BitDescription(8, "Unused"),
  64. )
  65. ChipDescription(
  66. Chip_ATMega8DIP28,
  67. bitfile = "atmega8dip28",
  68. runtimeID = (0x0003, 0x01),
  69. chipVendors = "Atmel",
  70. description = "AtMega8",
  71. fuseDesc = fuseDesc,
  72. lockbitDesc = lockbitDesc,
  73. packages = ( ("DIP28", ""), )
  74. )