summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2020-07-08 21:06:45 +0200
committerMichael Buesch <m@bues.ch>2020-07-08 22:57:12 +0200
commitd26c65dec52e5dab13bd88275fd5200d213cbb70 (patch)
tree2f4230f0725cfc42566493f4d021d04d66293e43
parent2704b87631bdbbdc6ec11b91a2b2bad1489980fc (diff)
downloadtoprammer-d26c65dec52e5dab13bd88275fd5200d213cbb70.tar.xz
toprammer-d26c65dec52e5dab13bd88275fd5200d213cbb70.zip
Run 2to3 on all .py files
plus some manual fixes Signed-off-by: Michael Buesch <m@bues.ch>
-rw-r--r--libtoprammer/bitfile.py30
-rw-r--r--libtoprammer/chip.py20
-rw-r--r--libtoprammer/chips/_74hc4094.py2
-rw-r--r--libtoprammer/chips/__init__.py40
-rw-r--r--libtoprammer/chips/atmega168dip28.py2
-rw-r--r--libtoprammer/chips/atmega328dip28.py2
-rw-r--r--libtoprammer/chips/atmega32dip40.py2
-rw-r--r--libtoprammer/chips/atmega48dip28.py2
-rw-r--r--libtoprammer/chips/atmega88dip28.py2
-rw-r--r--libtoprammer/chips/atmega8dip28.py2
-rw-r--r--libtoprammer/chips/attiny26dip20.py2
-rw-r--r--libtoprammer/chips/hm62256dip28.py2
-rw-r--r--libtoprammer/chips/microchip16/__init__.py48
-rwxr-xr-xlibtoprammer/chips/microchip16/makeSip6.py2
-rw-r--r--libtoprammer/chips/microchip16/microchip16_common.py10
-rw-r--r--libtoprammer/chips/microchip16/pic24f04ka200dip14.py36
-rw-r--r--libtoprammer/chips/microchip16/pic24f04ka200sip6.py36
-rw-r--r--libtoprammer/chips/microchip16/pic24f04ka201dip20.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f04ka201sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f04kl100dip14.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f04kl100sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f04kl101dip20.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f04kl101sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl200dip14.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl200sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl201dip20.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl201sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl301dip20.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl301sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl302dip28.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl302sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl401dip20.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl401sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl402dip28.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl402sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f16kl401dip20.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f16kl401sip6.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f16kl402dip28.py34
-rw-r--r--libtoprammer/chips/microchip16/pic24f16kl402sip6.py34
-rw-r--r--libtoprammer/chips/microchip8/__init__.py148
-rwxr-xr-xlibtoprammer/chips/microchip8/makeSip6.py2
-rw-r--r--libtoprammer/chips/microchip8/microchip8_18_common.py22
-rw-r--r--libtoprammer/chips/microchip8/microchip8_18f2221family.py2
-rw-r--r--libtoprammer/chips/microchip8/microchip8_splittedPMarea.py4
-rw-r--r--libtoprammer/chips/microchip8/microchip8_splittedPMarea_hasResetPC.py83
-rw-r--r--libtoprammer/chips/microchip8/pic10f200dip8.py35
-rw-r--r--libtoprammer/chips/microchip8/pic10f200sip6.py35
-rw-r--r--libtoprammer/chips/microchip8/pic10f202dip8.py2
-rw-r--r--libtoprammer/chips/microchip8/pic10f202sip6.py2
-rw-r--r--libtoprammer/chips/microchip8/pic10f320dip8.py6
-rw-r--r--libtoprammer/chips/microchip8/pic10f320sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic10f322dip8.py6
-rw-r--r--libtoprammer/chips/microchip8/pic10f322sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic12f1501dip8.py6
-rw-r--r--libtoprammer/chips/microchip8/pic12f1501sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic12f1822dip8.py6
-rw-r--r--libtoprammer/chips/microchip8/pic12f1822sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic12f508dip8.py2
-rw-r--r--libtoprammer/chips/microchip8/pic12f508sip6.py2
-rw-r--r--libtoprammer/chips/microchip8/pic12f629dip8.py6
-rw-r--r--libtoprammer/chips/microchip8/pic12f629sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1454dip14.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1454sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1459dip20.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1459sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1503dip14.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1503sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1507dip20.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1507sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1508dip20.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1508sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1509dip20.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1509sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1823dip14.py2
-rw-r--r--libtoprammer/chips/microchip8/pic16f1824dip14.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1824sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1825dip14.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1825sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1826dip18.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1826sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1827dip18.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1827sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1828dip20.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1828sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1829dip20.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1829sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1933dip28.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1933sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1934dip40.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1934sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1936dip28.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1936sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1937dip40.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1937sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1938dip28.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1938sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1939dip40.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f1939sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f59dip40.py30
-rw-r--r--libtoprammer/chips/microchip8/pic16f59sip6.py30
-rw-r--r--libtoprammer/chips/microchip8/pic16f630dip14.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f630sip6.py6
-rw-r--r--libtoprammer/chips/microchip8/pic16f84adip18.py2
-rw-r--r--libtoprammer/chips/microchip8/pic16f84asip6.py2
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1902dip28.py7
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1902sip6.py7
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1903dip28.py7
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1903sip6.py7
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1904dip40.py7
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1904sip6.py7
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1906dip28.py7
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1906sip6.py7
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1907dip40.py7
-rw-r--r--libtoprammer/chips/microchip8/pic16lf1907sip6.py7
-rw-r--r--libtoprammer/chips/microchip8/pic18f1220dip18.py10
-rw-r--r--libtoprammer/chips/microchip8/pic18f1220sip6.py10
-rw-r--r--libtoprammer/chips/microchip8/pic18f2320dip28.py10
-rw-r--r--libtoprammer/chips/microchip8/pic18f2320sip6.py10
-rw-r--r--libtoprammer/chips/microchip8/pic18f2321dip28.py10
-rw-r--r--libtoprammer/chips/microchip8/pic18f2321sip6.py10
-rw-r--r--libtoprammer/chips/microchip8/pic18f67j60sip6.py2
-rw-r--r--libtoprammer/chips/unitest.py3
-rw-r--r--libtoprammer/command_queue.py2
-rw-r--r--libtoprammer/generic_algorithms.py2
-rw-r--r--libtoprammer/hardware_access_usb.py14
-rw-r--r--libtoprammer/ihex.py2
-rw-r--r--libtoprammer/layout_generator.py14
-rw-r--r--libtoprammer/main.py31
-rw-r--r--libtoprammer/top2049/gnd_layouts.py4
-rw-r--r--libtoprammer/top2049/vcc_layouts.py4
-rw-r--r--libtoprammer/top2049/vpp_layouts.py4
-rw-r--r--libtoprammer/top_devices.py8
-rw-r--r--libtoprammer/user_interface.py4
-rw-r--r--libtoprammer/util.py49
-rwxr-xr-xreverse-engineering/dump-parser.py8
-rwxr-xr-xsetup.py2
-rwxr-xr-xtoprammer140
-rwxr-xr-xtoprammer-gui81
-rwxr-xr-xtoprammer-layout76
139 files changed, 1131 insertions, 1130 deletions
diff --git a/libtoprammer/bitfile.py b/libtoprammer/bitfile.py
index 6f79502..7c02342 100644
--- a/libtoprammer/bitfile.py
+++ b/libtoprammer/bitfile.py
@@ -22,12 +22,12 @@ import sys
try:
import pkg_resources
except ImportError:
- print "Failed to import the 'pkg_resources' Python module."
- print "'pkg_resources' is part of the Python 'setuptools' package."
- print "On Debian Linux run: apt-get install python-pkg-resources"
+ print("Failed to import the 'pkg_resources' Python module.")
+ print("'pkg_resources' is part of the Python 'setuptools' package.")
+ print("On Debian Linux run: apt-get install python-pkg-resources")
sys.exit(1)
-from util import *
+from .util import *
class BitfileException(Exception): pass
@@ -73,7 +73,7 @@ class Bitfile:
fd = open(filename, "rb")
data = fd.read()
fd.close()
- except (IOError), e:
+ except (IOError) as e:
raise BitfileException("Failed to read \"" + filename + "\": " + e.strerror)
self.filename = filename
self.__parse(data)
@@ -86,7 +86,7 @@ class Bitfile:
i = len(self.MAGIC)
while i < len(data):
i += self.__parseNextField(data, i)
- except (IndexError), e:
+ except (IndexError) as e:
raise BitfileException("Failed to parse BIT file")
if not self.fpga:
raise BitfileException("No FPGA ID string found")
@@ -128,7 +128,7 @@ class Bitfile:
def __probeFile(fullpath):
try:
open(fullpath, "rb").close()
- except (IOError), e:
+ except (IOError) as e:
return False
return True
@@ -152,14 +152,14 @@ def bitfileFind(filename):
if __name__ == "__main__":
if len(sys.argv) != 3:
- print "Usage: %s file.bit ACTION"
- print ""
- print "Actions:"
- print " GETSRC - print the src-file field to stdout"
- print " GETFPGA - print the fpga-type field to stdout"
- print " GETDATE - print the date field to stdout"
- print " GETTIME - print the time field to stdout"
- print " GETPAYLOAD - print the payload field to stdout"
+ print("Usage: %s file.bit ACTION")
+ print("")
+ print("Actions:")
+ print(" GETSRC - print the src-file field to stdout")
+ print(" GETFPGA - print the fpga-type field to stdout")
+ print(" GETDATE - print the date field to stdout")
+ print(" GETTIME - print the time field to stdout")
+ print(" GETPAYLOAD - print the payload field to stdout")
sys.exit(1)
filename = sys.argv[1]
action = sys.argv[2].upper()
diff --git a/libtoprammer/chip.py b/libtoprammer/chip.py
index 79098ec..fe9cb70 100644
--- a/libtoprammer/chip.py
+++ b/libtoprammer/chip.py
@@ -20,11 +20,11 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from util import *
-from layout_generator import *
-from user_interface import *
-from generic_algorithms import *
-from ihex import *
+from .util import *
+from .layout_generator import *
+from .user_interface import *
+from .generic_algorithms import *
+from .ihex import *
class Chip(object):
@@ -143,7 +143,7 @@ class Chip(object):
if turnOn:
try:
generator = self.generator
- except (AttributeError), e:
+ except (AttributeError) as e:
self.throwError("BUG: Using auto-layout, but did not initialize it.",
always=True)
generator.applyVCCLayout(self.top)
@@ -158,7 +158,7 @@ class Chip(object):
if turnOn:
try:
generator = self.generator
- except (AttributeError), e:
+ except (AttributeError) as e:
self.throwError("BUG: Using auto-layout, but did not initialize it.",
always=True)
generator.applyVPPLayout(self.top, packagePinsToTurnOn)
@@ -170,7 +170,7 @@ class Chip(object):
if turnOn:
try:
generator = self.generator
- except (AttributeError), e:
+ except (AttributeError) as e:
self.throwError("BUG: Using auto-layout, but did not initialize it.",
always=True)
generator.applyGNDLayout(self.top)
@@ -350,7 +350,7 @@ class ChipOptionInt(ChipOption):
def castValue(self, string):
try:
value = int(string)
- except (ValueError), e:
+ except (ValueError) as e:
return None
if (self.minVal is not None and value < self.minVal) or\
(self.maxVal is not None and value > self.maxVal):
@@ -371,7 +371,7 @@ class ChipOptionFloat(ChipOption):
def castValue(self, string):
try:
value = float(string)
- except (ValueError), e:
+ except (ValueError) as e:
return None
if (self.minVal is not None and value < self.minVal) or\
(self.maxVal is not None and value > self.maxVal):
diff --git a/libtoprammer/chips/_74hc4094.py b/libtoprammer/chips/_74hc4094.py
index e04d63e..f1c6a4b 100644
--- a/libtoprammer/chips/_74hc4094.py
+++ b/libtoprammer/chips/_74hc4094.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from unitest import *
+from .unitest import *
class Chip_74hc4094(Chip_Unitest):
def __init__(self):
diff --git a/libtoprammer/chips/__init__.py b/libtoprammer/chips/__init__.py
index 0513f23..25fb9ee 100644
--- a/libtoprammer/chips/__init__.py
+++ b/libtoprammer/chips/__init__.py
@@ -1,22 +1,22 @@
# Import all chip modules in **ALPHABETICAL** order
-from _27cxxx import *
-from _74hc4094 import *
-from at89c2051dip20 import *
-from at89s51dip40 import *
-from at89s52dip40 import *
-from atmega168dip28 import *
-from atmega32dip40 import *
-from atmega328dip28 import *
-from atmega48dip28 import *
-from atmega88dip28 import *
-from atmega8dip28 import *
-from attiny13dip8 import *
-from attiny26dip20 import *
-from hm62256dip28 import *
-from m24cxxdip8 import *
-from m8cissp import *
-from unitest import *
-from w29ee011dip32 import *
-from microchip8 import *
-from microchip16 import *
+from ._27cxxx import *
+from ._74hc4094 import *
+from .at89c2051dip20 import *
+from .at89s51dip40 import *
+from .at89s52dip40 import *
+from .atmega168dip28 import *
+from .atmega32dip40 import *
+from .atmega328dip28 import *
+from .atmega48dip28 import *
+from .atmega88dip28 import *
+from .atmega8dip28 import *
+from .attiny13dip8 import *
+from .attiny26dip20 import *
+from .hm62256dip28 import *
+from .m24cxxdip8 import *
+from .m8cissp import *
+from .unitest import *
+from .w29ee011dip32 import *
+from .microchip8 import *
+from .microchip16 import *
diff --git a/libtoprammer/chips/atmega168dip28.py b/libtoprammer/chips/atmega168dip28.py
index bfc414a..c636423 100644
--- a/libtoprammer/chips/atmega168dip28.py
+++ b/libtoprammer/chips/atmega168dip28.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from atmega_common import *
+from .atmega_common import *
class Chip_ATMega168DIP28(Chip_ATMega_common):
diff --git a/libtoprammer/chips/atmega328dip28.py b/libtoprammer/chips/atmega328dip28.py
index 88acd09..98562bd 100644
--- a/libtoprammer/chips/atmega328dip28.py
+++ b/libtoprammer/chips/atmega328dip28.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from atmega_common import *
+from .atmega_common import *
class Chip_ATMega328DIP28(Chip_ATMega_common):
diff --git a/libtoprammer/chips/atmega32dip40.py b/libtoprammer/chips/atmega32dip40.py
index 508ad23..e2e1898 100644
--- a/libtoprammer/chips/atmega32dip40.py
+++ b/libtoprammer/chips/atmega32dip40.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from atmega_common import *
+from .atmega_common import *
class Chip_ATMega32DIP40(Chip_ATMega_common):
diff --git a/libtoprammer/chips/atmega48dip28.py b/libtoprammer/chips/atmega48dip28.py
index b305cab..c71aa0a 100644
--- a/libtoprammer/chips/atmega48dip28.py
+++ b/libtoprammer/chips/atmega48dip28.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from atmega_common import *
+from .atmega_common import *
class Chip_ATMega48DIP28(Chip_ATMega_common):
diff --git a/libtoprammer/chips/atmega88dip28.py b/libtoprammer/chips/atmega88dip28.py
index 449b0f4..6130f0e 100644
--- a/libtoprammer/chips/atmega88dip28.py
+++ b/libtoprammer/chips/atmega88dip28.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from atmega_common import *
+from .atmega_common import *
class Chip_ATMega88DIP28(Chip_ATMega_common):
diff --git a/libtoprammer/chips/atmega8dip28.py b/libtoprammer/chips/atmega8dip28.py
index cfc0fe7..a331c87 100644
--- a/libtoprammer/chips/atmega8dip28.py
+++ b/libtoprammer/chips/atmega8dip28.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from atmega_common import *
+from .atmega_common import *
class Chip_ATMega8DIP28(Chip_ATMega_common):
diff --git a/libtoprammer/chips/attiny26dip20.py b/libtoprammer/chips/attiny26dip20.py
index f5df8db..5f93b7d 100644
--- a/libtoprammer/chips/attiny26dip20.py
+++ b/libtoprammer/chips/attiny26dip20.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from atmega_common import *
+from .atmega_common import *
class Chip_ATTiny26DIP20(Chip_ATMega_common):
diff --git a/libtoprammer/chips/hm62256dip28.py b/libtoprammer/chips/hm62256dip28.py
index 708c5a9..6d2ca00 100644
--- a/libtoprammer/chips/hm62256dip28.py
+++ b/libtoprammer/chips/hm62256dip28.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from generic_sram import *
+from .generic_sram import *
class Chip_HM62256DIP28(Chip_genericSRAM):
diff --git a/libtoprammer/chips/microchip16/__init__.py b/libtoprammer/chips/microchip16/__init__.py
index 0448ec5..8c0983b 100644
--- a/libtoprammer/chips/microchip16/__init__.py
+++ b/libtoprammer/chips/microchip16/__init__.py
@@ -1,24 +1,24 @@
-from pic24f04ka200dip14 import *
-from pic24f04ka201dip20 import *
-from pic24f16kl402dip28 import *
-from pic24f08kl402dip28 import *
-from pic24f16kl401dip20 import *
-from pic24f08kl401dip20 import *
-from pic24f08kl302dip28 import *
-from pic24f08kl301dip20 import *
-from pic24f08kl201dip20 import *
-from pic24f08kl200dip14 import *
-from pic24f04kl101dip20 import *
-from pic24f04kl100dip14 import *
-from pic24f04ka200sip6 import *
-from pic24f04ka201sip6 import *
-from pic24f04kl100sip6 import *
-from pic24f04kl101sip6 import *
-from pic24f08kl200sip6 import *
-from pic24f08kl201sip6 import *
-from pic24f08kl301sip6 import *
-from pic24f08kl302sip6 import *
-from pic24f08kl401sip6 import *
-from pic24f08kl402sip6 import *
-from pic24f16kl401sip6 import *
-from pic24f16kl402sip6 import *
+from .pic24f04ka200dip14 import *
+from .pic24f04ka201dip20 import *
+from .pic24f16kl402dip28 import *
+from .pic24f08kl402dip28 import *
+from .pic24f16kl401dip20 import *
+from .pic24f08kl401dip20 import *
+from .pic24f08kl302dip28 import *
+from .pic24f08kl301dip20 import *
+from .pic24f08kl201dip20 import *
+from .pic24f08kl200dip14 import *
+from .pic24f04kl101dip20 import *
+from .pic24f04kl100dip14 import *
+from .pic24f04ka200sip6 import *
+from .pic24f04ka201sip6 import *
+from .pic24f04kl100sip6 import *
+from .pic24f04kl101sip6 import *
+from .pic24f08kl200sip6 import *
+from .pic24f08kl201sip6 import *
+from .pic24f08kl301sip6 import *
+from .pic24f08kl302sip6 import *
+from .pic24f08kl401sip6 import *
+from .pic24f08kl402sip6 import *
+from .pic24f16kl401sip6 import *
+from .pic24f16kl402sip6 import *
diff --git a/libtoprammer/chips/microchip16/makeSip6.py b/libtoprammer/chips/microchip16/makeSip6.py
index bedca51..ca6dcd8 100755
--- a/libtoprammer/chips/microchip16/makeSip6.py
+++ b/libtoprammer/chips/microchip16/makeSip6.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
# TOP2049 Open Source programming suite
diff --git a/libtoprammer/chips/microchip16/microchip16_common.py b/libtoprammer/chips/microchip16/microchip16_common.py
index 1e3ab26..1257fd8 100644
--- a/libtoprammer/chips/microchip16/microchip16_common.py
+++ b/libtoprammer/chips/microchip16/microchip16_common.py
@@ -60,7 +60,7 @@ class Chip_Microchip16_common(Chip):
delayP18 = 0.001 # delay between first nMCLR fall and first PGCx rise
delayP19 = 0.001 # delay between last PGC fall for key sequence on PGDx and second nMCLR rise
- deviceIDAddr = 0xFF0000
+ deviceIDAddr = 0xFF0000
deviceIDLength = 1
deviceIdMapDict = {
@@ -388,7 +388,7 @@ class Chip_Microchip16_common(Chip):
# another bug in Microchip's doc - s/0x200F86/0x200F80/
self.executeCode((0x200F80, 0x880190))
for configWord16 in listConfigWord16:
- print ("write CW 0x{:x}".format(configWord16))
+ print("write CW 0x{:x}".format(configWord16))
# Load the Config reg data to W6
self.executeCode(((0x200006 | (configWord16 << 4)),))
# Write the Config. reg. data to the write latch and increment Write Pointer
@@ -505,11 +505,13 @@ class Chip_Microchip16_common(Chip):
def isBusy(self):
return bool(self.getStatusFlags() & self.STAT_BUSY)
+
def setTopProgrammerDelays(self):
# print("tdel5:{:d}".format(int(math.ceil(self.delayP3 / 42e-9))))
# print("tdly:{:d}".format(int(math.ceil(self.delayCommandDataREGOUT / 42e-9))))
self.top.cmdFPGAWrite(0x10, int(math.ceil(self.delayP3 / 42e-9)))
self.top.cmdFPGAWrite(0x11, int(math.ceil(self.delayCommandDataREGOUT / 42e-9)))
+
def busyWait(self):
# We do not poll the busy flag, because that would result
# in a significant slowdown. We delay long enough for the
@@ -519,8 +521,8 @@ class Chip_Microchip16_common(Chip):
for i in range(0, 100):
if not self.isBusy():
return
- self.top.hostDelay(0.000001)
- self.throwError("Timeout in busywait.")
+ self.top.hostDelay(0.000001)
+ self.throwError("Timeout in busywait.")
def getCodeInitializeTBLPAG(self, addr, wIdx=0):
mlw = (addr & 0xFFFF) << 4
diff --git a/libtoprammer/chips/microchip16/pic24f04ka200dip14.py b/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
index beafad5..f49c3ba 100644
--- a/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
+++ b/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import ka200_fuseDesc
+from .microchip16_common import *
+from .configWords import ka200_fuseDesc
class Chip_Pic24f04ka200dip14(Chip_Microchip16_common):
@@ -34,25 +34,25 @@ class Chip_Pic24f04ka200dip14(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP14",
- chipPinVCC=14,
- chipPinsVPP=1,
- chipPinGND=13,
- signature="\x02\x0d",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP14",
+ chipPinVCC=14,
+ chipPinsVPP=1,
+ chipPinGND=13,
+ signature="\x02\x0d",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0xAFE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
-
+
fuseDesc = ka200_fuseDesc
ChipDescription(
diff --git a/libtoprammer/chips/microchip16/pic24f04ka200sip6.py b/libtoprammer/chips/microchip16/pic24f04ka200sip6.py
index 270f4d9..86c9fb2 100644
--- a/libtoprammer/chips/microchip16/pic24f04ka200sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f04ka200sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import ka200_fuseDesc
+from .microchip16_common import *
+from .configWords import ka200_fuseDesc
class Chip_Pic24f04ka200sip6(Chip_Microchip16_common):
@@ -39,25 +39,25 @@ class Chip_Pic24f04ka200sip6(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x02\x0d",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x02\x0d",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0xAFE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
-
+
fuseDesc = ka200_fuseDesc
ChipDescription(
diff --git a/libtoprammer/chips/microchip16/pic24f04ka201dip20.py b/libtoprammer/chips/microchip16/pic24f04ka201dip20.py
index 64dd695..a06dbb9 100644
--- a/libtoprammer/chips/microchip16/pic24f04ka201dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f04ka201dip20.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import ka200_fuseDesc
+from .microchip16_common import *
+from .configWords import ka200_fuseDesc
class Chip_Pic24f04ka201dip20(Chip_Microchip16_common):
@@ -34,21 +34,21 @@ class Chip_Pic24f04ka201dip20(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP20",
- chipPinVCC=20,
- chipPinsVPP=1,
- chipPinGND=19,
- signature="\x00\x0d",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP20",
+ chipPinVCC=20,
+ chipPinsVPP=1,
+ chipPinGND=19,
+ signature="\x00\x0d",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0xAFE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f04ka201sip6.py b/libtoprammer/chips/microchip16/pic24f04ka201sip6.py
index 50c5d54..8b2e5a4 100644
--- a/libtoprammer/chips/microchip16/pic24f04ka201sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f04ka201sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import ka200_fuseDesc
+from .microchip16_common import *
+from .configWords import ka200_fuseDesc
class Chip_Pic24f04ka201sip6(Chip_Microchip16_common):
@@ -39,21 +39,21 @@ class Chip_Pic24f04ka201sip6(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x00\x0d",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x00\x0d",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0xAFE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f04kl100dip14.py b/libtoprammer/chips/microchip16/pic24f04kl100dip14.py
index bcf0023..50849e2 100644
--- a/libtoprammer/chips/microchip16/pic24f04kl100dip14.py
+++ b/libtoprammer/chips/microchip16/pic24f04kl100dip14.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f04kl100dip14(Chip_Microchip16_common):
@@ -34,21 +34,21 @@ class Chip_Pic24f04kl100dip14(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP14",
- chipPinVCC=14,
- chipPinsVPP=1,
- chipPinGND=13,
- signature="\x01\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP14",
+ chipPinVCC=14,
+ chipPinsVPP=1,
+ chipPinGND=13,
+ signature="\x01\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0xAFE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f04kl100sip6.py b/libtoprammer/chips/microchip16/pic24f04kl100sip6.py
index 300ff06..d95860d 100644
--- a/libtoprammer/chips/microchip16/pic24f04kl100sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f04kl100sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f04kl100sip6(Chip_Microchip16_common):
@@ -39,21 +39,21 @@ class Chip_Pic24f04kl100sip6(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x01\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x01\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0xAFE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f04kl101dip20.py b/libtoprammer/chips/microchip16/pic24f04kl101dip20.py
index d96cbc9..37ed6ae 100644
--- a/libtoprammer/chips/microchip16/pic24f04kl101dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f04kl101dip20.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f04kl101dip20(Chip_Microchip16_common):
@@ -34,21 +34,21 @@ class Chip_Pic24f04kl101dip20(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP20",
- chipPinVCC=20,
- chipPinsVPP=1,
- chipPinGND=19,
- signature="\x02\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP20",
+ chipPinVCC=20,
+ chipPinsVPP=1,
+ chipPinGND=19,
+ signature="\x02\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0xAFE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f04kl101sip6.py b/libtoprammer/chips/microchip16/pic24f04kl101sip6.py
index 74dad3b..7194885 100644
--- a/libtoprammer/chips/microchip16/pic24f04kl101sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f04kl101sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f04kl101sip6(Chip_Microchip16_common):
@@ -39,21 +39,21 @@ class Chip_Pic24f04kl101sip6(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x02\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x02\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0xAFE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl200dip14.py b/libtoprammer/chips/microchip16/pic24f08kl200dip14.py
index 678070f..61394a2 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl200dip14.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl200dip14.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl200dip14(Chip_Microchip16_common):
@@ -34,21 +34,21 @@ class Chip_Pic24f08kl200dip14(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP14",
- chipPinVCC=14,
- chipPinsVPP=1,
- chipPinGND=13,
- signature="\x05\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x15FE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP14",
+ chipPinVCC=14,
+ chipPinsVPP=1,
+ chipPinGND=13,
+ signature="\x05\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x15FE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl200sip6.py b/libtoprammer/chips/microchip16/pic24f08kl200sip6.py
index d553bf4..f7340b1 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl200sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl200sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl200sip6(Chip_Microchip16_common):
@@ -39,21 +39,21 @@ class Chip_Pic24f08kl200sip6(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x05\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x15FE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x05\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x15FE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl201dip20.py b/libtoprammer/chips/microchip16/pic24f08kl201dip20.py
index 139497a..85dfc8d 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl201dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl201dip20.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl201dip20(Chip_Microchip16_common):
@@ -34,21 +34,21 @@ class Chip_Pic24f08kl201dip20(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP20",
- chipPinVCC=20,
- chipPinsVPP=1,
- chipPinGND=19,
- signature="\x06\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x15FE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP20",
+ chipPinVCC=20,
+ chipPinsVPP=1,
+ chipPinGND=19,
+ signature="\x06\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x15FE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl201sip6.py b/libtoprammer/chips/microchip16/pic24f08kl201sip6.py
index 77c032a..86dcfa3 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl201sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl201sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl201sip6(Chip_Microchip16_common):
@@ -39,21 +39,21 @@ class Chip_Pic24f08kl201sip6(Chip_Microchip16_common):
hasEEPROM = False
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x06\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x15FE / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0,
- eepromPages=0,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x06\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x15FE / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0,
+ eepromPages=0,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl301dip20.py b/libtoprammer/chips/microchip16/pic24f08kl301dip20.py
index 6fad118..93183ee 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl301dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl301dip20.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl301dip20(Chip_Microchip16_common):
@@ -34,21 +34,21 @@ class Chip_Pic24f08kl301dip20(Chip_Microchip16_common):
eepromStartAddress = 0x7FFF00
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP20",
- chipPinVCC=20,
- chipPinsVPP=1,
- chipPinGND=19,
- signature="\x0a\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x80,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP20",
+ chipPinVCC=20,
+ chipPinsVPP=1,
+ chipPinGND=19,
+ signature="\x0a\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x2bfe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x80,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl301sip6.py b/libtoprammer/chips/microchip16/pic24f08kl301sip6.py
index cb365eb..7a99289 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl301sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl301sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl301sip6(Chip_Microchip16_common):
@@ -39,21 +39,21 @@ class Chip_Pic24f08kl301sip6(Chip_Microchip16_common):
eepromStartAddress = 0x7FFF00
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x0a\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x80,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x0a\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x2bfe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x80,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl302dip28.py b/libtoprammer/chips/microchip16/pic24f08kl302dip28.py
index 0af09d1..7701ced 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl302dip28.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl302dip28.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl302dip28(Chip_Microchip16_common):
@@ -34,21 +34,21 @@ class Chip_Pic24f08kl302dip28(Chip_Microchip16_common):
eepromStartAddress = 0x7FFF00
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP28",
- chipPinVCC=28,
- chipPinsVPP=1,
- chipPinGND=27,
- signature="\x00\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x15fe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x80,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP28",
+ chipPinVCC=28,
+ chipPinsVPP=1,
+ chipPinGND=27,
+ signature="\x00\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x15fe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x80,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl302sip6.py b/libtoprammer/chips/microchip16/pic24f08kl302sip6.py
index be001a5..734276c 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl302sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl302sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl302sip6(Chip_Microchip16_common):
@@ -39,21 +39,21 @@ class Chip_Pic24f08kl302sip6(Chip_Microchip16_common):
eepromStartAddress = 0x7FFF00
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x00\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x15fe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x80,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x00\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x15fe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x80,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl401dip20.py b/libtoprammer/chips/microchip16/pic24f08kl401dip20.py
index c31829a..6a4ccac 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl401dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl401dip20.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl401dip20(Chip_Microchip16_common):
@@ -32,21 +32,21 @@ class Chip_Pic24f08kl401dip20(Chip_Microchip16_common):
logicalFlashConfigurationMemorySize = 0x800000
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP20",
- chipPinVCC=20,
- chipPinsVPP=1,
- chipPinGND=19,
- signature="\x0e\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x100,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP20",
+ chipPinVCC=20,
+ chipPinsVPP=1,
+ chipPinGND=19,
+ signature="\x0e\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x2bfe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x100,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl401sip6.py b/libtoprammer/chips/microchip16/pic24f08kl401sip6.py
index c937c70..a9f60eb 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl401sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl401sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl401sip6(Chip_Microchip16_common):
@@ -37,21 +37,21 @@ class Chip_Pic24f08kl401sip6(Chip_Microchip16_common):
logicalFlashConfigurationMemorySize = 0x800000
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x0e\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x100,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x0e\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x2bfe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x100,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl402dip28.py b/libtoprammer/chips/microchip16/pic24f08kl402dip28.py
index aaf6b95..f8a05c1 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl402dip28.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl402dip28.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl402dip28(Chip_Microchip16_common):
@@ -32,21 +32,21 @@ class Chip_Pic24f08kl402dip28(Chip_Microchip16_common):
logicalFlashConfigurationMemorySize = 0x800000
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP28",
- chipPinVCC=28,
- chipPinsVPP=1,
- chipPinGND=27,
- signature="\x04\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x15fe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x100,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP28",
+ chipPinVCC=28,
+ chipPinsVPP=1,
+ chipPinGND=27,
+ signature="\x04\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x15fe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x100,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f08kl402sip6.py b/libtoprammer/chips/microchip16/pic24f08kl402sip6.py
index 913a632..7ce11e2 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl402sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl402sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f08kl402sip6(Chip_Microchip16_common):
@@ -37,21 +37,21 @@ class Chip_Pic24f08kl402sip6(Chip_Microchip16_common):
logicalFlashConfigurationMemorySize = 0x800000
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x04\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x15fe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x100,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x04\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x15fe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x100,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f16kl401dip20.py b/libtoprammer/chips/microchip16/pic24f16kl401dip20.py
index 18ab112..41f2072 100644
--- a/libtoprammer/chips/microchip16/pic24f16kl401dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f16kl401dip20.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f16kl401dip20(Chip_Microchip16_common):
@@ -32,21 +32,21 @@ class Chip_Pic24f16kl401dip20(Chip_Microchip16_common):
logicalFlashConfigurationMemorySize = 0x800000
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP20",
- chipPinVCC=20,
- chipPinsVPP=1,
- chipPinGND=19,
- signature="\x1e\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x100,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP20",
+ chipPinVCC=20,
+ chipPinsVPP=1,
+ chipPinGND=19,
+ signature="\x1e\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x2bfe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x100,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f16kl401sip6.py b/libtoprammer/chips/microchip16/pic24f16kl401sip6.py
index 6b3fa44..7de33aa 100644
--- a/libtoprammer/chips/microchip16/pic24f16kl401sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f16kl401sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f16kl401sip6(Chip_Microchip16_common):
@@ -37,21 +37,21 @@ class Chip_Pic24f16kl401sip6(Chip_Microchip16_common):
logicalFlashConfigurationMemorySize = 0x800000
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x1e\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x100,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x1e\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x2bfe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x100,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f16kl402dip28.py b/libtoprammer/chips/microchip16/pic24f16kl402dip28.py
index 5739ed1..b79cd40 100644
--- a/libtoprammer/chips/microchip16/pic24f16kl402dip28.py
+++ b/libtoprammer/chips/microchip16/pic24f16kl402dip28.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f16kl402dip28(Chip_Microchip16_common):
@@ -32,21 +32,21 @@ class Chip_Pic24f16kl402dip28(Chip_Microchip16_common):
logicalFlashConfigurationMemorySize = 0x800000
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage="DIP28",
- chipPinVCC=28,
- chipPinsVPP=1,
- chipPinGND=27,
- signature="\x14\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x100,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage="DIP28",
+ chipPinVCC=28,
+ chipPinsVPP=1,
+ chipPinGND=27,
+ signature="\x14\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x2bfe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x100,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip16/pic24f16kl402sip6.py b/libtoprammer/chips/microchip16/pic24f16kl402sip6.py
index c90d9a8..928286b 100644
--- a/libtoprammer/chips/microchip16/pic24f16kl402sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f16kl402sip6.py
@@ -25,8 +25,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip16_common import *
-from configWords import klx0x_fuseDesc
+from .microchip16_common import *
+from .configWords import klx0x_fuseDesc
class Chip_Pic24f16kl402sip6(Chip_Microchip16_common):
@@ -37,21 +37,21 @@ class Chip_Pic24f16kl402sip6(Chip_Microchip16_common):
logicalFlashConfigurationMemorySize = 0x800000
def __init__(self):
- Chip_Microchip16_common.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x14\x4b",
- # flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
- # flashPageSize=0x40,
- flashPages=1,
- # eepromPageSize (in 16bit words)
- eepromPageSize=0x100,
- eepromPages=1,
- # all 7 words uses lowest byte only
- fuseBytes=2 * 9
+ Chip_Microchip16_common.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x14\x4b",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0x2bfe / 2 + 2,
+ # flashPageSize=0x40,
+ flashPages=1,
+ # eepromPageSize (in 16bit words)
+ eepromPageSize=0x100,
+ eepromPages=1,
+ # all 7 words uses lowest byte only
+ fuseBytes=2 * 9
)
self.configWordAddr = 0xF80000
# self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize
diff --git a/libtoprammer/chips/microchip8/__init__.py b/libtoprammer/chips/microchip8/__init__.py
index a503bc1..c5439e3 100644
--- a/libtoprammer/chips/microchip8/__init__.py
+++ b/libtoprammer/chips/microchip8/__init__.py
@@ -1,75 +1,75 @@
-from pic10f200dip8 import *
-from pic10f200sip6 import *
-from pic10f202dip8 import *
-from pic10f202sip6 import *
-from pic10f320dip8 import *
-from pic10f320sip6 import *
-from pic10f322dip8 import *
-from pic10f322sip6 import *
-from pic12f1501dip8 import *
-from pic12f1501sip6 import *
-from pic12f1822dip8 import *
-from pic12f1822sip6 import *
-from pic12f508dip8 import *
-from pic12f508sip6 import *
-from pic12f629dip8 import *
-from pic12f629sip6 import *
-from pic16f1454dip14 import *
-from pic16f1454sip6 import *
-from pic16f1459dip20 import *
-from pic16f1459sip6 import *
-from pic16f1503dip14 import *
-from pic16f1503sip6 import *
-from pic16f1507dip20 import *
-from pic16f1507sip6 import *
-from pic16f1508dip20 import *
-from pic16f1508sip6 import *
-from pic16f1509dip20 import *
-from pic16f1509sip6 import *
-from pic16f1824dip14 import *
-from pic16f1824sip6 import *
-from pic16f1825dip14 import *
-from pic16f1825sip6 import *
-from pic16f1826dip18 import *
-from pic16f1826sip6 import *
-from pic16f1827dip18 import *
-from pic16f1827sip6 import *
-from pic16f1828dip20 import *
-from pic16f1828sip6 import *
-from pic16f1829dip20 import *
-from pic16f1829sip6 import *
-from pic16f1933dip28 import *
-from pic16f1933sip6 import *
-from pic16f1934dip40 import *
-from pic16f1934sip6 import *
-from pic16f1936dip28 import *
-from pic16f1936sip6 import *
-from pic16f1937dip40 import *
-from pic16f1937sip6 import *
-from pic16f1938dip28 import *
-from pic16f1938sip6 import *
-from pic16f1939dip40 import *
-from pic16f1939sip6 import *
-from pic16f59dip40 import *
-from pic16f59sip6 import *
-from pic16f630dip14 import *
-from pic16f630sip6 import *
-from pic16f84adip18 import *
-from pic16f84asip6 import *
-from pic16lf1902dip28 import *
-from pic16lf1902sip6 import *
-from pic16lf1903dip28 import *
-from pic16lf1903sip6 import *
-from pic16lf1904dip40 import *
-from pic16lf1904sip6 import *
-from pic16lf1906dip28 import *
-from pic16lf1906sip6 import *
-from pic16lf1907dip40 import *
-from pic16lf1907sip6 import *
-from pic18f1220dip18 import *
-from pic18f1220sip6 import *
-from pic18f2320dip28 import *
-from pic18f2320sip6 import *
-from pic18f2321dip28 import *
-from pic18f2321sip6 import *
+from .pic10f200dip8 import *
+from .pic10f200sip6 import *
+from .pic10f202dip8 import *
+from .pic10f202sip6 import *
+from .pic10f320dip8 import *
+from .pic10f320sip6 import *
+from .pic10f322dip8 import *
+from .pic10f322sip6 import *
+from .pic12f1501dip8 import *
+from .pic12f1501sip6 import *
+from .pic12f1822dip8 import *
+from .pic12f1822sip6 import *
+from .pic12f508dip8 import *
+from .pic12f508sip6 import *
+from .pic12f629dip8 import *
+from .pic12f629sip6 import *
+from .pic16f1454dip14 import *
+from .pic16f1454sip6 import *
+from .pic16f1459dip20 import *
+from .pic16f1459sip6 import *
+from .pic16f1503dip14 import *
+from .pic16f1503sip6 import *
+from .pic16f1507dip20 import *
+from .pic16f1507sip6 import *
+from .pic16f1508dip20 import *
+from .pic16f1508sip6 import *
+from .pic16f1509dip20 import *
+from .pic16f1509sip6 import *
+from .pic16f1824dip14 import *
+from .pic16f1824sip6 import *
+from .pic16f1825dip14 import *
+from .pic16f1825sip6 import *
+from .pic16f1826dip18 import *
+from .pic16f1826sip6 import *
+from .pic16f1827dip18 import *
+from .pic16f1827sip6 import *
+from .pic16f1828dip20 import *
+from .pic16f1828sip6 import *
+from .pic16f1829dip20 import *
+from .pic16f1829sip6 import *
+from .pic16f1933dip28 import *
+from .pic16f1933sip6 import *
+from .pic16f1934dip40 import *
+from .pic16f1934sip6 import *
+from .pic16f1936dip28 import *
+from .pic16f1936sip6 import *
+from .pic16f1937dip40 import *
+from .pic16f1937sip6 import *
+from .pic16f1938dip28 import *
+from .pic16f1938sip6 import *
+from .pic16f1939dip40 import *
+from .pic16f1939sip6 import *
+from .pic16f59dip40 import *
+from .pic16f59sip6 import *
+from .pic16f630dip14 import *
+from .pic16f630sip6 import *
+from .pic16f84adip18 import *
+from .pic16f84asip6 import *
+from .pic16lf1902dip28 import *
+from .pic16lf1902sip6 import *
+from .pic16lf1903dip28 import *
+from .pic16lf1903sip6 import *
+from .pic16lf1904dip40 import *
+from .pic16lf1904sip6 import *
+from .pic16lf1906dip28 import *
+from .pic16lf1906sip6 import *
+from .pic16lf1907dip40 import *
+from .pic16lf1907sip6 import *
+from .pic18f1220dip18 import *
+from .pic18f1220sip6 import *
+from .pic18f2320dip28 import *
+from .pic18f2320sip6 import *
+from .pic18f2321dip28 import *
+from .pic18f2321sip6 import *
#from pic18f67j60sip6 import *
diff --git a/libtoprammer/chips/microchip8/makeSip6.py b/libtoprammer/chips/microchip8/makeSip6.py
index 2f024fa..0853b86 100755
--- a/libtoprammer/chips/microchip8/makeSip6.py
+++ b/libtoprammer/chips/microchip8/makeSip6.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
# TOP2049 Open Source programming suite
diff --git a/libtoprammer/chips/microchip8/microchip8_18_common.py b/libtoprammer/chips/microchip8/microchip8_18_common.py
index 0ad1264..1af69c0 100644
--- a/libtoprammer/chips/microchip8/microchip8_18_common.py
+++ b/libtoprammer/chips/microchip8/microchip8_18_common.py
@@ -49,16 +49,16 @@ class Chip_Microchip8_18_common(Chip):
# default delays - can be overridden
delayP2A = 400e-9 # Serial clock low time
- delayP5 = 2.2e-6 # Delay between 4-bit command and command operand
- delayP5A = 2.2e-6 # Delay between 4-bit command operand and next 4-bit command
- delayP6 = 2.2e-6 # Delay between last SCK fall of command byte to first SCK rise of read data word
- delayP9 = 1e-3 # SCK High time (minimum programming time)
- delayP10 = 30e-6 # SCK Low time after programming (high-voltage discharge time)
- delayP11 = 0.01 # Delay to allow self-timed data write or bulk erase to occur
- delayP12 = 0.000002 # Input data hold time from nMCLR/Vpp rise
- delayP13 = 0.0000001 # Vdd rise setup time to nMCLR/Vpp rise
- delayP14 = 0.00000001 # Data out Valid from SCK rise
- delayP15 = 0.000002 # PGM rise setup time to nMCLR/Vpp rise
+ delayP5 = 2.2e-6 # Delay between 4-bit command and command operand
+ delayP5A = 2.2e-6 # Delay between 4-bit command operand and next 4-bit command
+ delayP6 = 2.2e-6 # Delay between last SCK fall of command byte to first SCK rise of read data word
+ delayP9 = 1e-3 # SCK High time (minimum programming time)
+ delayP10 = 30e-6 # SCK Low time after programming (high-voltage discharge time)
+ delayP11 = 0.01 # Delay to allow self-timed data write or bulk erase to occur
+ delayP12 = 0.000002 # Input data hold time from nMCLR/Vpp rise
+ delayP13 = 0.0000001 # Vdd rise setup time to nMCLR/Vpp rise
+ delayP14 = 0.00000001 # Data out Valid from SCK rise
+ delayP15 = 0.000002 # PGM rise setup time to nMCLR/Vpp rise
userIDLocationSize = 8
userIDLocationAddr = 0x200000
@@ -388,7 +388,7 @@ class Chip_Microchip8_18_common(Chip):
for i in range(0, 100):
if not self.isBusy():
return
- self.top.hostDelay(0.000001)
+ self.top.hostDelay(0.000001)
self.throwError("Timeout in busywait.")
def getCodeAddrToTBLPTR(self, addr):
diff --git a/libtoprammer/chips/microchip8/microchip8_18f2221family.py b/libtoprammer/chips/microchip8/microchip8_18f2221family.py
index dca8dfd..4aeb23d 100644
--- a/libtoprammer/chips/microchip8/microchip8_18f2221family.py
+++ b/libtoprammer/chips/microchip8/microchip8_18f2221family.py
@@ -28,7 +28,7 @@ class microchip8_18f2221family(Chip_Microchip8_18_common):
voltageVPP = 11
delayP2A = 0.0000008 # Serial clock low time
- delayP5 = 0.0000015 # Delay between 4-bit command and command operand
+ delayP5 = 0.0000015 # Delay between 4-bit command and command operand
def __init__(self,
chipPackage, chipPinVCC, chipPinsVPP, chipPinGND,
diff --git a/libtoprammer/chips/microchip8/microchip8_splittedPMarea.py b/libtoprammer/chips/microchip8/microchip8_splittedPMarea.py
index 92d8401..0ec38b9 100644
--- a/libtoprammer/chips/microchip8/microchip8_splittedPMarea.py
+++ b/libtoprammer/chips/microchip8/microchip8_splittedPMarea.py
@@ -104,10 +104,10 @@ class microchip8_splittedPMarea(Chip_Microchip8_common):
def setPC(self, address):
if(self.isInsideProgramMemoryArea):
if(address >= self.logicalFlashProgramMemorySize):
- raise(TOPException('Cannot set PC to address inside PM {:x}'.format(address)))
+ raise TOPException('Cannot set PC to address inside PM {:x}'.format(address))
else:
if(address < self.logicalFlashProgramMemorySize):
- raise(TOPException('Cannot set PC to address outside PM {:x}'.format(address)))
+ raise TOPException('Cannot set PC to address outside PM {:x}'.format(address))
while(self.PC != address):
self.incrementPC(1)
diff --git a/libtoprammer/chips/microchip8/microchip8_splittedPMarea_hasResetPC.py b/libtoprammer/chips/microchip8/microchip8_splittedPMarea_hasResetPC.py
index b7bd991..531ff6e 100644
--- a/libtoprammer/chips/microchip8/microchip8_splittedPMarea_hasResetPC.py
+++ b/libtoprammer/chips/microchip8/microchip8_splittedPMarea_hasResetPC.py
@@ -24,49 +24,50 @@ from libtoprammer.chips.microchip8.microchip8_splittedPMarea import *
class microchip8_splittedPMarea_hasResetPC(microchip8_splittedPMarea):
- CMD_RESET_ADDRESS = 0x16
+ CMD_RESET_ADDRESS = 0x16
- userIDLocationSize = 4
- voltageVDD = 3
- voltageVPP = 8.5
+ userIDLocationSize = 4
+ voltageVDD = 3
+ voltageVPP = 8.5
- logicalFlashProgramMemorySize = 0x8000
- logicalFlashConfigurationMemorySize = 0x8000
+ logicalFlashProgramMemorySize = 0x8000
+ logicalFlashConfigurationMemorySize = 0x8000
- def __init__(self,
- chipPackage, chipPinVCC, chipPinsVPP, chipPinGND,
- signature,
- flashPageSize, flashPages,
- eepromPageSize, eepromPages,
- fuseBytes
- ):
- microchip8_splittedPMarea.__init__(self, chipPackage, chipPinVCC, chipPinsVPP, chipPinGND, signature, flashPageSize, flashPages, eepromPageSize, eepromPages, fuseBytes)
+ def __init__(self,
+ chipPackage, chipPinVCC, chipPinsVPP, chipPinGND,
+ signature,
+ flashPageSize, flashPages,
+ eepromPageSize, eepromPages,
+ fuseBytes):
+ microchip8_splittedPMarea.__init__(self, chipPackage, chipPinVCC,
+ chipPinsVPP, chipPinGND, signature,
+ flashPageSize, flashPages,
+ eepromPageSize, eepromPages, fuseBytes)
- def setPC(self, address):
- if(self.isInsideProgramMemoryArea):
- if(address >= self.logicalFlashProgramMemorySize):
- raise(TOPException('Cannot set PC to address inside PM {:x}'.format(address)))
- if(address < self.PC):
- self.resetPC()
- self.setPC(address)
- else:
- if(address < self.logicalFlashProgramMemorySize):
- raise(TOPException('Cannot set PC to address outside PM {:x}'.format(address)))
- if(address < self.PC):
- self.resetPC()
- self.enterConfigArea()
- self.setPC(address)
- while(self.PC != address):
- self.incrementPC(1)
+ def setPC(self, address):
+ if(self.isInsideProgramMemoryArea):
+ if(address >= self.logicalFlashProgramMemorySize):
+ raise TOPException('Cannot set PC to address inside PM {:x}'.format(address))
+ if(address < self.PC):
+ self.resetPC()
+ self.setPC(address)
+ else:
+ if(address < self.logicalFlashProgramMemorySize):
+ raise TOPException('Cannot set PC to address outside PM {:x}'.format(address))
+ if(address < self.PC):
+ self.resetPC()
+ self.enterConfigArea()
+ self.setPC(address)
+ while(self.PC != address):
+ self.incrementPC(1)
- def resetPC(self):
- if hasattr(self, 'osccalAddr'):
- if not hasattr(self, 'CMD_RESET_ADDRESS'):
- print("reset instruction is not supported")
- self.exitPM()
- self.enterPM()
- else:
- self.sendCommand(0, 0, 0, self.CMD_RESET_ADDRESS)
- self.PC = 0
- self.isInsideProgramMemoryArea = True
-
+ def resetPC(self):
+ if hasattr(self, 'osccalAddr'):
+ if not hasattr(self, 'CMD_RESET_ADDRESS'):
+ print("reset instruction is not supported")
+ self.exitPM()
+ self.enterPM()
+ else:
+ self.sendCommand(0, 0, 0, self.CMD_RESET_ADDRESS)
+ self.PC = 0
+ self.isInsideProgramMemoryArea = True
diff --git a/libtoprammer/chips/microchip8/pic10f200dip8.py b/libtoprammer/chips/microchip8/pic10f200dip8.py
index 71dba66..e189869 100644
--- a/libtoprammer/chips/microchip8/pic10f200dip8.py
+++ b/libtoprammer/chips/microchip8/pic10f200dip8.py
@@ -20,28 +20,27 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_singlePMarea import *
+from .microchip8_singlePMarea import *
class Chip_Pic10F200dip8(microchip8_singlePMarea):
- # CONFIGURATION WORD FOR PIC10F200/202/204/206
- # X X X X X X X MCLRE /CP WDT X X
- logicalFlashSize = 0x200
+ # CONFIGURATION WORD FOR PIC10F200/202/204/206
+ # X X X X X X X MCLRE /CP WDT X X
+ logicalFlashSize = 0x200
- def __init__(self):
- microchip8_singlePMarea.__init__(self,
- chipPackage="DIP8",
- chipPinVCC=2,
- chipPinsVPP=8,
- chipPinGND=7,
- signature="\x09\x18\x24\x35",
- flashPageSize=0x100,
- flashPages=1,
- eepromPageSize=0,
- eepromPages=0,
- fuseBytes=2
- )
-
+ def __init__(self):
+ microchip8_singlePMarea.__init__(self,
+ chipPackage="DIP8",
+ chipPinVCC=2,
+ chipPinsVPP=8,
+ chipPinGND=7,
+ signature="\x09\x18\x24\x35",
+ flashPageSize=0x100,
+ flashPages=1,
+ eepromPageSize=0,
+ eepromPages=0,
+ fuseBytes=2
+ )
fuseDesc = (
BitDescription(0, "Unused"),
diff --git a/libtoprammer/chips/microchip8/pic10f200sip6.py b/libtoprammer/chips/microchip8/pic10f200sip6.py
index a760273..3b1a4a9 100644
--- a/libtoprammer/chips/microchip8/pic10f200sip6.py
+++ b/libtoprammer/chips/microchip8/pic10f200sip6.py
@@ -25,28 +25,27 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_singlePMarea import *
+from .microchip8_singlePMarea import *
class Chip_Pic10F200sip6(microchip8_singlePMarea):
- # CONFIGURATION WORD FOR PIC10F200/202/204/206
- # X X X X X X X MCLRE /CP WDT X X
- logicalFlashSize = 0x200
+ # CONFIGURATION WORD FOR PIC10F200/202/204/206
+ # X X X X X X X MCLRE /CP WDT X X
+ logicalFlashSize = 0x200
- def __init__(self):
- microchip8_singlePMarea.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="\x09\x18\x24\x35",
- flashPageSize=0x100,
- flashPages=1,
- eepromPageSize=0,
- eepromPages=0,
- fuseBytes=2
- )
-
+ def __init__(self):
+ microchip8_singlePMarea.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="\x09\x18\x24\x35",
+ flashPageSize=0x100,
+ flashPages=1,
+ eepromPageSize=0,
+ eepromPages=0,
+ fuseBytes=2
+ )
fuseDesc = (
BitDescription(0, "Unused"),
diff --git a/libtoprammer/chips/microchip8/pic10f202dip8.py b/libtoprammer/chips/microchip8/pic10f202dip8.py
index c875729..2a7d041 100644
--- a/libtoprammer/chips/microchip8/pic10f202dip8.py
+++ b/libtoprammer/chips/microchip8/pic10f202dip8.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_singlePMarea import *
+from .microchip8_singlePMarea import *
class Chip_Pic10F202dip8(microchip8_singlePMarea):
diff --git a/libtoprammer/chips/microchip8/pic10f202sip6.py b/libtoprammer/chips/microchip8/pic10f202sip6.py
index 7597a61..631d7df 100644
--- a/libtoprammer/chips/microchip8/pic10f202sip6.py
+++ b/libtoprammer/chips/microchip8/pic10f202sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_singlePMarea import *
+from .microchip8_singlePMarea import *
class Chip_Pic10F202sip6(microchip8_singlePMarea):
diff --git a/libtoprammer/chips/microchip8/pic10f320dip8.py b/libtoprammer/chips/microchip8/pic10f320dip8.py
index 264c55d..6620dd7 100644
--- a/libtoprammer/chips/microchip8/pic10f320dip8.py
+++ b/libtoprammer/chips/microchip8/pic10f320dip8.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic10F320dip8(microchip8_splittedPMarea_hasResetPC):
@@ -30,8 +30,8 @@ class Chip_Pic10F320dip8(microchip8_splittedPMarea_hasResetPC):
logicalFlashProgramMemorySize = 0x2000
logicalFlashConfigurationMemorySize = 0x2000
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP8",
chipPinVCC=2,
chipPinsVPP=8,
diff --git a/libtoprammer/chips/microchip8/pic10f320sip6.py b/libtoprammer/chips/microchip8/pic10f320sip6.py
index 09cb4d9..0429800 100644
--- a/libtoprammer/chips/microchip8/pic10f320sip6.py
+++ b/libtoprammer/chips/microchip8/pic10f320sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic10F320sip6(microchip8_splittedPMarea_hasResetPC):
@@ -35,8 +35,8 @@ class Chip_Pic10F320sip6(microchip8_splittedPMarea_hasResetPC):
logicalFlashProgramMemorySize = 0x2000
logicalFlashConfigurationMemorySize = 0x2000
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic10f322dip8.py b/libtoprammer/chips/microchip8/pic10f322dip8.py
index 90c4c9a..08044f6 100644
--- a/libtoprammer/chips/microchip8/pic10f322dip8.py
+++ b/libtoprammer/chips/microchip8/pic10f322dip8.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic10F322dip8(microchip8_splittedPMarea_hasResetPC):
@@ -30,8 +30,8 @@ class Chip_Pic10F322dip8(microchip8_splittedPMarea_hasResetPC):
logicalFlashProgramMemorySize = 0x2000
logicalFlashConfigurationMemorySize = 0x2000
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP8",
chipPinVCC=2,
chipPinsVPP=8,
diff --git a/libtoprammer/chips/microchip8/pic10f322sip6.py b/libtoprammer/chips/microchip8/pic10f322sip6.py
index 84bc72b..5840223 100644
--- a/libtoprammer/chips/microchip8/pic10f322sip6.py
+++ b/libtoprammer/chips/microchip8/pic10f322sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic10F322sip6(microchip8_splittedPMarea_hasResetPC):
@@ -35,8 +35,8 @@ class Chip_Pic10F322sip6(microchip8_splittedPMarea_hasResetPC):
logicalFlashProgramMemorySize = 0x2000
logicalFlashConfigurationMemorySize = 0x2000
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic12f1501dip8.py b/libtoprammer/chips/microchip8/pic12f1501dip8.py
index e2fa62e..c709d4a 100644
--- a/libtoprammer/chips/microchip8/pic12f1501dip8.py
+++ b/libtoprammer/chips/microchip8/pic12f1501dip8.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic12F1501dip8(microchip8_splittedPMarea_hasResetPC):
rowSize = 32
nLatches = 32
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP8",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic12f1501sip6.py b/libtoprammer/chips/microchip8/pic12f1501sip6.py
index 34da05a..6213cc9 100644
--- a/libtoprammer/chips/microchip8/pic12f1501sip6.py
+++ b/libtoprammer/chips/microchip8/pic12f1501sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic12F1501sip6(microchip8_splittedPMarea_hasResetPC):
rowSize = 32
nLatches = 32
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic12f1822dip8.py b/libtoprammer/chips/microchip8/pic12f1822dip8.py
index 649584f..232b1dc 100644
--- a/libtoprammer/chips/microchip8/pic12f1822dip8.py
+++ b/libtoprammer/chips/microchip8/pic12f1822dip8.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic12F1822dip8(microchip8_splittedPMarea_hasResetPC):
@@ -28,8 +28,8 @@ class Chip_Pic12F1822dip8(microchip8_splittedPMarea_hasResetPC):
nLatches = 16
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP8",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic12f1822sip6.py b/libtoprammer/chips/microchip8/pic12f1822sip6.py
index aa90134..b883024 100644
--- a/libtoprammer/chips/microchip8/pic12f1822sip6.py
+++ b/libtoprammer/chips/microchip8/pic12f1822sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic12F1822sip6(microchip8_splittedPMarea_hasResetPC):
@@ -33,8 +33,8 @@ class Chip_Pic12F1822sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 16
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic12f508dip8.py b/libtoprammer/chips/microchip8/pic12f508dip8.py
index 2779b58..d4e4355 100644
--- a/libtoprammer/chips/microchip8/pic12f508dip8.py
+++ b/libtoprammer/chips/microchip8/pic12f508dip8.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_singlePMarea import *
+from .microchip8_singlePMarea import *
class Chip_Pic12F508dip8(microchip8_singlePMarea):
diff --git a/libtoprammer/chips/microchip8/pic12f508sip6.py b/libtoprammer/chips/microchip8/pic12f508sip6.py
index e4f090e..cd574d1 100644
--- a/libtoprammer/chips/microchip8/pic12f508sip6.py
+++ b/libtoprammer/chips/microchip8/pic12f508sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_singlePMarea import *
+from .microchip8_singlePMarea import *
class Chip_Pic12F508sip6(microchip8_singlePMarea):
diff --git a/libtoprammer/chips/microchip8/pic12f629dip8.py b/libtoprammer/chips/microchip8/pic12f629dip8.py
index fae3afa..2574f80 100644
--- a/libtoprammer/chips/microchip8/pic12f629dip8.py
+++ b/libtoprammer/chips/microchip8/pic12f629dip8.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea import *
+from .microchip8_splittedPMarea import *
class Chip_Pic12F629dip8(microchip8_splittedPMarea):
voltageVDD = 5
@@ -33,8 +33,8 @@ class Chip_Pic12F629dip8(microchip8_splittedPMarea):
delayTinternalProgPM = 0.002
delayTinternalProgDM = 0.005
- def __init__(self):
- microchip8_splittedPMarea.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea.__init__(self,
chipPackage="DIP8",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic12f629sip6.py b/libtoprammer/chips/microchip8/pic12f629sip6.py
index 0534e3c..b3c0009 100644
--- a/libtoprammer/chips/microchip8/pic12f629sip6.py
+++ b/libtoprammer/chips/microchip8/pic12f629sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea import *
+from .microchip8_splittedPMarea import *
class Chip_Pic12F629sip6(microchip8_splittedPMarea):
voltageVDD = 5
@@ -38,8 +38,8 @@ class Chip_Pic12F629sip6(microchip8_splittedPMarea):
delayTinternalProgPM = 0.002
delayTinternalProgDM = 0.005
- def __init__(self):
- microchip8_splittedPMarea.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1454dip14.py b/libtoprammer/chips/microchip8/pic16f1454dip14.py
index b07e9ab..1fdad1d 100644
--- a/libtoprammer/chips/microchip8/pic16f1454dip14.py
+++ b/libtoprammer/chips/microchip8/pic16f1454dip14.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1454dip14(microchip8_splittedPMarea_hasResetPC):
@@ -28,8 +28,8 @@ class Chip_Pic16F1454dip14(microchip8_splittedPMarea_hasResetPC):
rowSize = 32
nDeviceIdRevisionBits = 0
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP14",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1454sip6.py b/libtoprammer/chips/microchip8/pic16f1454sip6.py
index 6bf8951..424fd32 100644
--- a/libtoprammer/chips/microchip8/pic16f1454sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1454sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1454sip6(microchip8_splittedPMarea_hasResetPC):
@@ -33,8 +33,8 @@ class Chip_Pic16F1454sip6(microchip8_splittedPMarea_hasResetPC):
rowSize = 32
nDeviceIdRevisionBits = 0
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1459dip20.py b/libtoprammer/chips/microchip8/pic16f1459dip20.py
index 9a3fba1..14ef682 100644
--- a/libtoprammer/chips/microchip8/pic16f1459dip20.py
+++ b/libtoprammer/chips/microchip8/pic16f1459dip20.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1459dip20(microchip8_splittedPMarea_hasResetPC):
@@ -28,8 +28,8 @@ class Chip_Pic16F1459dip20(microchip8_splittedPMarea_hasResetPC):
rowSize = 32
nDeviceIdRevisionBits = 0
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP20",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1459sip6.py b/libtoprammer/chips/microchip8/pic16f1459sip6.py
index 01affcc..499162c 100644
--- a/libtoprammer/chips/microchip8/pic16f1459sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1459sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1459sip6(microchip8_splittedPMarea_hasResetPC):
@@ -33,8 +33,8 @@ class Chip_Pic16F1459sip6(microchip8_splittedPMarea_hasResetPC):
rowSize = 32
nDeviceIdRevisionBits = 0
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1503dip14.py b/libtoprammer/chips/microchip8/pic16f1503dip14.py
index de94513..163364e 100644
--- a/libtoprammer/chips/microchip8/pic16f1503dip14.py
+++ b/libtoprammer/chips/microchip8/pic16f1503dip14.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1503dip14(microchip8_splittedPMarea_hasResetPC):
nLatches = 16
rowSize = 16
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP14",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1503sip6.py b/libtoprammer/chips/microchip8/pic16f1503sip6.py
index 1e3421e..dc27e60 100644
--- a/libtoprammer/chips/microchip8/pic16f1503sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1503sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1503sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 16
rowSize = 16
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1507dip20.py b/libtoprammer/chips/microchip8/pic16f1507dip20.py
index aa0da48..caa7434 100644
--- a/libtoprammer/chips/microchip8/pic16f1507dip20.py
+++ b/libtoprammer/chips/microchip8/pic16f1507dip20.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1507dip20(microchip8_splittedPMarea_hasResetPC):
nLatches = 16
rowSize = 16
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP20",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1507sip6.py b/libtoprammer/chips/microchip8/pic16f1507sip6.py
index 72656fa..002b8fc 100644
--- a/libtoprammer/chips/microchip8/pic16f1507sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1507sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1507sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 16
rowSize = 16
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1508dip20.py b/libtoprammer/chips/microchip8/pic16f1508dip20.py
index 649bc9d..e90f9c0 100644
--- a/libtoprammer/chips/microchip8/pic16f1508dip20.py
+++ b/libtoprammer/chips/microchip8/pic16f1508dip20.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1508dip20(microchip8_splittedPMarea_hasResetPC):
nLatches = 32
rowSize = 32
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP20",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1508sip6.py b/libtoprammer/chips/microchip8/pic16f1508sip6.py
index 3ff127a..3e0c512 100644
--- a/libtoprammer/chips/microchip8/pic16f1508sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1508sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1508sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 32
rowSize = 32
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1509dip20.py b/libtoprammer/chips/microchip8/pic16f1509dip20.py
index fedb191..42d485a 100644
--- a/libtoprammer/chips/microchip8/pic16f1509dip20.py
+++ b/libtoprammer/chips/microchip8/pic16f1509dip20.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1509dip20(microchip8_splittedPMarea_hasResetPC):
nLatches = 32
rowSize = 32
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP20",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1509sip6.py b/libtoprammer/chips/microchip8/pic16f1509sip6.py
index 1024324..1931bd2 100644
--- a/libtoprammer/chips/microchip8/pic16f1509sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1509sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1509sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 32
rowSize = 32
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1823dip14.py b/libtoprammer/chips/microchip8/pic16f1823dip14.py
index 74df2a9..78a0d1f 100644
--- a/libtoprammer/chips/microchip8/pic16f1823dip14.py
+++ b/libtoprammer/chips/microchip8/pic16f1823dip14.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1823dip14(microchip8_splittedPMarea_hasResetPC):
diff --git a/libtoprammer/chips/microchip8/pic16f1824dip14.py b/libtoprammer/chips/microchip8/pic16f1824dip14.py
index c272977..eb649f7 100644
--- a/libtoprammer/chips/microchip8/pic16f1824dip14.py
+++ b/libtoprammer/chips/microchip8/pic16f1824dip14.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1824dip14(microchip8_splittedPMarea_hasResetPC):
@@ -29,8 +29,8 @@ class Chip_Pic16F1824dip14(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP14",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1824sip6.py b/libtoprammer/chips/microchip8/pic16f1824sip6.py
index 70bd383..a870c62 100644
--- a/libtoprammer/chips/microchip8/pic16f1824sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1824sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1824sip6(microchip8_splittedPMarea_hasResetPC):
@@ -34,8 +34,8 @@ class Chip_Pic16F1824sip6(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1825dip14.py b/libtoprammer/chips/microchip8/pic16f1825dip14.py
index bca82d7..5bb373c 100644
--- a/libtoprammer/chips/microchip8/pic16f1825dip14.py
+++ b/libtoprammer/chips/microchip8/pic16f1825dip14.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1825dip14(microchip8_splittedPMarea_hasResetPC):
@@ -29,8 +29,8 @@ class Chip_Pic16F1825dip14(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP14",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1825sip6.py b/libtoprammer/chips/microchip8/pic16f1825sip6.py
index 4f8a057..5e31713 100644
--- a/libtoprammer/chips/microchip8/pic16f1825sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1825sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1825sip6(microchip8_splittedPMarea_hasResetPC):
@@ -34,8 +34,8 @@ class Chip_Pic16F1825sip6(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1826dip18.py b/libtoprammer/chips/microchip8/pic16f1826dip18.py
index 966ed6d..5c37cf5 100644
--- a/libtoprammer/chips/microchip8/pic16f1826dip18.py
+++ b/libtoprammer/chips/microchip8/pic16f1826dip18.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_PIC16F1826dip18(microchip8_splittedPMarea_hasResetPC):
@@ -29,8 +29,8 @@ class Chip_PIC16F1826dip18(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP18",
chipPinVCC=14,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1826sip6.py b/libtoprammer/chips/microchip8/pic16f1826sip6.py
index d9f4f46..716ff0b 100644
--- a/libtoprammer/chips/microchip8/pic16f1826sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1826sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_PIC16F1826sip6(microchip8_splittedPMarea_hasResetPC):
@@ -34,8 +34,8 @@ class Chip_PIC16F1826sip6(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1827dip18.py b/libtoprammer/chips/microchip8/pic16f1827dip18.py
index 5158503..9dfe840 100644
--- a/libtoprammer/chips/microchip8/pic16f1827dip18.py
+++ b/libtoprammer/chips/microchip8/pic16f1827dip18.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1827dip18(microchip8_splittedPMarea_hasResetPC):
@@ -29,8 +29,8 @@ class Chip_Pic16F1827dip18(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP18",
chipPinVCC=14,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1827sip6.py b/libtoprammer/chips/microchip8/pic16f1827sip6.py
index cc1dcaf..780b0f9 100644
--- a/libtoprammer/chips/microchip8/pic16f1827sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1827sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1827sip6(microchip8_splittedPMarea_hasResetPC):
@@ -34,8 +34,8 @@ class Chip_Pic16F1827sip6(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1828dip20.py b/libtoprammer/chips/microchip8/pic16f1828dip20.py
index 02516d2..1ec8fa5 100644
--- a/libtoprammer/chips/microchip8/pic16f1828dip20.py
+++ b/libtoprammer/chips/microchip8/pic16f1828dip20.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1828dip20(microchip8_splittedPMarea_hasResetPC):
@@ -29,8 +29,8 @@ class Chip_Pic16F1828dip20(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP20",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1828sip6.py b/libtoprammer/chips/microchip8/pic16f1828sip6.py
index 40c2115..3f9077c 100644
--- a/libtoprammer/chips/microchip8/pic16f1828sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1828sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1828sip6(microchip8_splittedPMarea_hasResetPC):
@@ -34,8 +34,8 @@ class Chip_Pic16F1828sip6(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1829dip20.py b/libtoprammer/chips/microchip8/pic16f1829dip20.py
index ee52059..d9ccbfc 100644
--- a/libtoprammer/chips/microchip8/pic16f1829dip20.py
+++ b/libtoprammer/chips/microchip8/pic16f1829dip20.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1829dip20(microchip8_splittedPMarea_hasResetPC):
@@ -29,8 +29,8 @@ class Chip_Pic16F1829dip20(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="DIP20",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f1829sip6.py b/libtoprammer/chips/microchip8/pic16f1829sip6.py
index ba6a5c0..4bbb682 100644
--- a/libtoprammer/chips/microchip8/pic16f1829sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1829sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1829sip6(microchip8_splittedPMarea_hasResetPC):
@@ -34,8 +34,8 @@ class Chip_Pic16F1829sip6(microchip8_splittedPMarea_hasResetPC):
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1933dip28.py b/libtoprammer/chips/microchip8/pic16f1933dip28.py
index 1a2f39c..cb6eb8c 100644
--- a/libtoprammer/chips/microchip8/pic16f1933dip28.py
+++ b/libtoprammer/chips/microchip8/pic16f1933dip28.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1933dip28(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip28",
chipPinVCC=20,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16f1933sip6.py b/libtoprammer/chips/microchip8/pic16f1933sip6.py
index 03548c5..c8c1659 100644
--- a/libtoprammer/chips/microchip8/pic16f1933sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1933sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1933sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1934dip40.py b/libtoprammer/chips/microchip8/pic16f1934dip40.py
index 4fa36ba..49bc077 100644
--- a/libtoprammer/chips/microchip8/pic16f1934dip40.py
+++ b/libtoprammer/chips/microchip8/pic16f1934dip40.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1934dip40(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip40",
chipPinVCC=32,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16f1934sip6.py b/libtoprammer/chips/microchip8/pic16f1934sip6.py
index a0c8113..ffdb648 100644
--- a/libtoprammer/chips/microchip8/pic16f1934sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1934sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1934sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1936dip28.py b/libtoprammer/chips/microchip8/pic16f1936dip28.py
index b3fe5c2..5f2f61f 100644
--- a/libtoprammer/chips/microchip8/pic16f1936dip28.py
+++ b/libtoprammer/chips/microchip8/pic16f1936dip28.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1936dip28(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip28",
chipPinVCC=20,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16f1936sip6.py b/libtoprammer/chips/microchip8/pic16f1936sip6.py
index 92506b6..a4e8161 100644
--- a/libtoprammer/chips/microchip8/pic16f1936sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1936sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1936sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1937dip40.py b/libtoprammer/chips/microchip8/pic16f1937dip40.py
index 48c3303..5997ee8 100644
--- a/libtoprammer/chips/microchip8/pic16f1937dip40.py
+++ b/libtoprammer/chips/microchip8/pic16f1937dip40.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1937dip40(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip40",
chipPinVCC=32,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16f1937sip6.py b/libtoprammer/chips/microchip8/pic16f1937sip6.py
index b93bc7c..c9df960 100644
--- a/libtoprammer/chips/microchip8/pic16f1937sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1937sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1937sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1938dip28.py b/libtoprammer/chips/microchip8/pic16f1938dip28.py
index 4fa3105..4627973 100644
--- a/libtoprammer/chips/microchip8/pic16f1938dip28.py
+++ b/libtoprammer/chips/microchip8/pic16f1938dip28.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1938dip28(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip28",
chipPinVCC=20,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16f1938sip6.py b/libtoprammer/chips/microchip8/pic16f1938sip6.py
index 31c0087..eab0abd 100644
--- a/libtoprammer/chips/microchip8/pic16f1938sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1938sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1938sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f1939dip40.py b/libtoprammer/chips/microchip8/pic16f1939dip40.py
index a538ba3..6a547f7 100644
--- a/libtoprammer/chips/microchip8/pic16f1939dip40.py
+++ b/libtoprammer/chips/microchip8/pic16f1939dip40.py
@@ -20,15 +20,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1939dip40(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip40",
chipPinVCC=32,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16f1939sip6.py b/libtoprammer/chips/microchip8/pic16f1939sip6.py
index fa92705..085b5ec 100644
--- a/libtoprammer/chips/microchip8/pic16f1939sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f1939sip6.py
@@ -25,15 +25,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16F1939sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
hasEEPROM = True
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f59dip40.py b/libtoprammer/chips/microchip8/pic16f59dip40.py
index a575a7b..dc7bc2c 100644
--- a/libtoprammer/chips/microchip8/pic16f59dip40.py
+++ b/libtoprammer/chips/microchip8/pic16f59dip40.py
@@ -20,27 +20,27 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_singlePMarea import *
+from .microchip8_singlePMarea import *
class Chip_Pic16F59dip40(microchip8_singlePMarea):
- logicalFlashSize = 0x1000
+ logicalFlashSize = 0x1000
- def __init__(self):
- microchip8_singlePMarea.__init__(self,
- chipPackage="DIP40",
- chipPinVCC=15,
- chipPinsVPP=14,
- chipPinGND=5,
- signature="",
- flashPageSize=0x200,
- flashPages=4,
- eepromPageSize=0,
- eepromPages=0,
- fuseBytes=2
- )
+ def __init__(self):
+ microchip8_singlePMarea.__init__(self,
+ chipPackage="DIP40",
+ chipPinVCC=15,
+ chipPinsVPP=14,
+ chipPinGND=5,
+ signature="",
+ flashPageSize=0x200,
+ flashPages=4,
+ eepromPageSize=0,
+ eepromPages=0,
+ fuseBytes=2
+ )
fuseDesc = (
BitDescription(0, "FOSC0"),
diff --git a/libtoprammer/chips/microchip8/pic16f59sip6.py b/libtoprammer/chips/microchip8/pic16f59sip6.py
index 60cc249..eab7caa 100644
--- a/libtoprammer/chips/microchip8/pic16f59sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f59sip6.py
@@ -25,27 +25,27 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_singlePMarea import *
+from .microchip8_singlePMarea import *
class Chip_Pic16F59sip6(microchip8_singlePMarea):
- logicalFlashSize = 0x1000
+ logicalFlashSize = 0x1000
- def __init__(self):
- microchip8_singlePMarea.__init__(self,
- chipPackage = "DIP10",
- chipPinVCC = 9,
- chipPinsVPP = 10,
- chipPinGND = 8,
- signature="",
- flashPageSize=0x200,
- flashPages=4,
- eepromPageSize=0,
- eepromPages=0,
- fuseBytes=2
- )
+ def __init__(self):
+ microchip8_singlePMarea.__init__(self,
+ chipPackage = "DIP10",
+ chipPinVCC = 9,
+ chipPinsVPP = 10,
+ chipPinGND = 8,
+ signature="",
+ flashPageSize=0x200,
+ flashPages=4,
+ eepromPageSize=0,
+ eepromPages=0,
+ fuseBytes=2
+ )
fuseDesc = (
BitDescription(0, "FOSC0"),
diff --git a/libtoprammer/chips/microchip8/pic16f630dip14.py b/libtoprammer/chips/microchip8/pic16f630dip14.py
index 98da9de..c6ab4c8 100644
--- a/libtoprammer/chips/microchip8/pic16f630dip14.py
+++ b/libtoprammer/chips/microchip8/pic16f630dip14.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea import *
+from .microchip8_splittedPMarea import *
class Chip_Pic16F630dip14(microchip8_splittedPMarea):
voltageVDD = 5
@@ -33,8 +33,8 @@ class Chip_Pic16F630dip14(microchip8_splittedPMarea):
delayTinternalProgPM = 0.002
delayTinternalProgDM = 0.005
- def __init__(self):
- microchip8_splittedPMarea.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea.__init__(self,
chipPackage="DIP14",
chipPinVCC=1,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic16f630sip6.py b/libtoprammer/chips/microchip8/pic16f630sip6.py
index e084a5c..bc7da4b 100644
--- a/libtoprammer/chips/microchip8/pic16f630sip6.py
+++ b/libtoprammer/chips/microchip8/pic16f630sip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea import *
+from .microchip8_splittedPMarea import *
class Chip_Pic16F630sip6(microchip8_splittedPMarea):
voltageVDD = 5
@@ -38,8 +38,8 @@ class Chip_Pic16F630sip6(microchip8_splittedPMarea):
delayTinternalProgPM = 0.002
delayTinternalProgDM = 0.005
- def __init__(self):
- microchip8_splittedPMarea.__init__(self,
+ def __init__(self):
+ microchip8_splittedPMarea.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16f84adip18.py b/libtoprammer/chips/microchip8/pic16f84adip18.py
index e3c4426..0a62644 100644
--- a/libtoprammer/chips/microchip8/pic16f84adip18.py
+++ b/libtoprammer/chips/microchip8/pic16f84adip18.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea import *
+from .microchip8_splittedPMarea import *
class Chip_Pic16F84adip18(microchip8_splittedPMarea):
CMD_BEGIN_ERASE_PROGRAMMING_CYCLE = 0x8
diff --git a/libtoprammer/chips/microchip8/pic16f84asip6.py b/libtoprammer/chips/microchip8/pic16f84asip6.py
index 749fece..6c0fe89 100644
--- a/libtoprammer/chips/microchip8/pic16f84asip6.py
+++ b/libtoprammer/chips/microchip8/pic16f84asip6.py
@@ -25,7 +25,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea import *
+from .microchip8_splittedPMarea import *
class Chip_Pic16F84asip6(microchip8_splittedPMarea):
CMD_BEGIN_ERASE_PROGRAMMING_CYCLE = 0x8
diff --git a/libtoprammer/chips/microchip8/pic16lf1902dip28.py b/libtoprammer/chips/microchip8/pic16lf1902dip28.py
index fb6a4fa..2b786bd 100644
--- a/libtoprammer/chips/microchip8/pic16lf1902dip28.py
+++ b/libtoprammer/chips/microchip8/pic16lf1902dip28.py
@@ -20,13 +20,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1902dip28(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip28",
chipPinVCC=20,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16lf1902sip6.py b/libtoprammer/chips/microchip8/pic16lf1902sip6.py
index ee6bdef..7615e04 100644
--- a/libtoprammer/chips/microchip8/pic16lf1902sip6.py
+++ b/libtoprammer/chips/microchip8/pic16lf1902sip6.py
@@ -25,13 +25,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1902sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16lf1903dip28.py b/libtoprammer/chips/microchip8/pic16lf1903dip28.py
index 4cc6fcb..02ec6b2 100644
--- a/libtoprammer/chips/microchip8/pic16lf1903dip28.py
+++ b/libtoprammer/chips/microchip8/pic16lf1903dip28.py
@@ -20,13 +20,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1903dip28(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip28",
chipPinVCC=20,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16lf1903sip6.py b/libtoprammer/chips/microchip8/pic16lf1903sip6.py
index 6c35b0d..9e97abd 100644
--- a/libtoprammer/chips/microchip8/pic16lf1903sip6.py
+++ b/libtoprammer/chips/microchip8/pic16lf1903sip6.py
@@ -25,13 +25,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1903sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16lf1904dip40.py b/libtoprammer/chips/microchip8/pic16lf1904dip40.py
index 858219c..37c7b67 100644
--- a/libtoprammer/chips/microchip8/pic16lf1904dip40.py
+++ b/libtoprammer/chips/microchip8/pic16lf1904dip40.py
@@ -20,13 +20,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1904dip40(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip40",
chipPinVCC=32,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16lf1904sip6.py b/libtoprammer/chips/microchip8/pic16lf1904sip6.py
index 18105d5..7e63a4b 100644
--- a/libtoprammer/chips/microchip8/pic16lf1904sip6.py
+++ b/libtoprammer/chips/microchip8/pic16lf1904sip6.py
@@ -25,13 +25,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1904sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16lf1906dip28.py b/libtoprammer/chips/microchip8/pic16lf1906dip28.py
index b92b696..e87d779 100644
--- a/libtoprammer/chips/microchip8/pic16lf1906dip28.py
+++ b/libtoprammer/chips/microchip8/pic16lf1906dip28.py
@@ -20,13 +20,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1906dip28(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip28",
chipPinVCC=20,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16lf1906sip6.py b/libtoprammer/chips/microchip8/pic16lf1906sip6.py
index 145dd84..2acf0ec 100644
--- a/libtoprammer/chips/microchip8/pic16lf1906sip6.py
+++ b/libtoprammer/chips/microchip8/pic16lf1906sip6.py
@@ -25,13 +25,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1906sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic16lf1907dip40.py b/libtoprammer/chips/microchip8/pic16lf1907dip40.py
index 82fa34a..65d5ce6 100644
--- a/libtoprammer/chips/microchip8/pic16lf1907dip40.py
+++ b/libtoprammer/chips/microchip8/pic16lf1907dip40.py
@@ -20,13 +20,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1907dip40(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage="dip40",
chipPinVCC=32,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic16lf1907sip6.py b/libtoprammer/chips/microchip8/pic16lf1907sip6.py
index d1550ca..7d76161 100644
--- a/libtoprammer/chips/microchip8/pic16lf1907sip6.py
+++ b/libtoprammer/chips/microchip8/pic16lf1907sip6.py
@@ -25,13 +25,14 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_splittedPMarea_hasResetPC import *
+from .microchip8_splittedPMarea_hasResetPC import *
class Chip_Pic16LF1907sip6(microchip8_splittedPMarea_hasResetPC):
nLatches = 8
- def __init__(self):
- microchip8_splittedPMarea_hasResetPC.__init__(self,
+
+ def __init__(self):
+ microchip8_splittedPMarea_hasResetPC.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic18f1220dip18.py b/libtoprammer/chips/microchip8/pic18f1220dip18.py
index 8de1646..bc060be 100644
--- a/libtoprammer/chips/microchip8/pic18f1220dip18.py
+++ b/libtoprammer/chips/microchip8/pic18f1220dip18.py
@@ -20,17 +20,17 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_18f1220family import *
+from .microchip8_18f1220family import *
class Chip_PIC18F1220dip18(microchip8_18f1220family):
hasEEPROM = True
- writeBufferSize = 8
- eraseBufferSize = 64
+ writeBufferSize = 8
+ eraseBufferSize = 64
- def __init__(self):
- microchip8_18f1220family.__init__(self,
+ def __init__(self):
+ microchip8_18f1220family.__init__(self,
chipPackage="DIP18",
chipPinVCC=14,
chipPinsVPP=4,
diff --git a/libtoprammer/chips/microchip8/pic18f1220sip6.py b/libtoprammer/chips/microchip8/pic18f1220sip6.py
index d07aab0..035188d 100644
--- a/libtoprammer/chips/microchip8/pic18f1220sip6.py
+++ b/libtoprammer/chips/microchip8/pic18f1220sip6.py
@@ -25,17 +25,17 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_18f1220family import *
+from .microchip8_18f1220family import *
class Chip_PIC18F1220sip6(microchip8_18f1220family):
hasEEPROM = True
- writeBufferSize = 8
- eraseBufferSize = 64
+ writeBufferSize = 8
+ eraseBufferSize = 64
- def __init__(self):
- microchip8_18f1220family.__init__(self,
+ def __init__(self):
+ microchip8_18f1220family.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic18f2320dip28.py b/libtoprammer/chips/microchip8/pic18f2320dip28.py
index a6e5644..03657bd 100644
--- a/libtoprammer/chips/microchip8/pic18f2320dip28.py
+++ b/libtoprammer/chips/microchip8/pic18f2320dip28.py
@@ -20,17 +20,17 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_18f1220family import *
+from .microchip8_18f1220family import *
class Chip_PIC18F2320dip28(microchip8_18f1220family):
hasEEPROM = True
- writeBufferSize = 8
- eraseBufferSize = 64
+ writeBufferSize = 8
+ eraseBufferSize = 64
- def __init__(self):
- microchip8_18f1220family.__init__(self,
+ def __init__(self):
+ microchip8_18f1220family.__init__(self,
chipPackage="DIP28",
chipPinVCC=20,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic18f2320sip6.py b/libtoprammer/chips/microchip8/pic18f2320sip6.py
index 901ac1b..a19062d 100644
--- a/libtoprammer/chips/microchip8/pic18f2320sip6.py
+++ b/libtoprammer/chips/microchip8/pic18f2320sip6.py
@@ -25,17 +25,17 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_18f1220family import *
+from .microchip8_18f1220family import *
class Chip_PIC18F2320sip6(microchip8_18f1220family):
hasEEPROM = True
- writeBufferSize = 8
- eraseBufferSize = 64
+ writeBufferSize = 8
+ eraseBufferSize = 64
- def __init__(self):
- microchip8_18f1220family.__init__(self,
+ def __init__(self):
+ microchip8_18f1220family.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic18f2321dip28.py b/libtoprammer/chips/microchip8/pic18f2321dip28.py
index f4669d8..5375d32 100644
--- a/libtoprammer/chips/microchip8/pic18f2321dip28.py
+++ b/libtoprammer/chips/microchip8/pic18f2321dip28.py
@@ -20,17 +20,17 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_18f2221family import *
+from .microchip8_18f2221family import *
class Chip_PIC18F2321dip28(microchip8_18f2221family):
hasEEPROM = True
- writeBufferSize = 8
- eraseBufferSize = 64
+ writeBufferSize = 8
+ eraseBufferSize = 64
- def __init__(self):
- microchip8_18f2221family.__init__(self,
+ def __init__(self):
+ microchip8_18f2221family.__init__(self,
chipPackage="DIP28",
chipPinVCC=20,
chipPinsVPP=1,
diff --git a/libtoprammer/chips/microchip8/pic18f2321sip6.py b/libtoprammer/chips/microchip8/pic18f2321sip6.py
index 8cbb795..388d82e 100644
--- a/libtoprammer/chips/microchip8/pic18f2321sip6.py
+++ b/libtoprammer/chips/microchip8/pic18f2321sip6.py
@@ -25,17 +25,17 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_18f2221family import *
+from .microchip8_18f2221family import *
class Chip_PIC18F2321sip6(microchip8_18f2221family):
hasEEPROM = True
- writeBufferSize = 8
- eraseBufferSize = 64
+ writeBufferSize = 8
+ eraseBufferSize = 64
- def __init__(self):
- microchip8_18f2221family.__init__(self,
+ def __init__(self):
+ microchip8_18f2221family.__init__(self,
chipPackage = "DIP10",
chipPinVCC = 9,
chipPinsVPP = 10,
diff --git a/libtoprammer/chips/microchip8/pic18f67j60sip6.py b/libtoprammer/chips/microchip8/pic18f67j60sip6.py
index f377742..9c23259 100644
--- a/libtoprammer/chips/microchip8/pic18f67j60sip6.py
+++ b/libtoprammer/chips/microchip8/pic18f67j60sip6.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from microchip8_18f97j60family import *
+from .microchip8_18f97j60family import *
class Chip_PIC18F67J60sip6(microchip8_18f97j60family):
diff --git a/libtoprammer/chips/unitest.py b/libtoprammer/chips/unitest.py
index 779f786..0bc9609 100644
--- a/libtoprammer/chips/unitest.py
+++ b/libtoprammer/chips/unitest.py
@@ -114,8 +114,7 @@ class Chip_Unitest(Chip):
assert(not packagePinsToTurnOn) # Not supported, yet.
layouts = []
if turnOn:
- layouts = map(lambda (layoutID, layoutMask): layoutID,
- self.generator.getVPPLayouts())
+ layouts = [layoutID_layoutMask[0] for layoutID_layoutMask in self.generator.getVPPLayouts()]
self.setVPP(self.autogenVPPVoltage, layouts)
# Overloaded layout generator interface.
diff --git a/libtoprammer/command_queue.py b/libtoprammer/command_queue.py
index 233b8ac..7a1d356 100644
--- a/libtoprammer/command_queue.py
+++ b/libtoprammer/command_queue.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from util import *
+from .util import *
import time
diff --git a/libtoprammer/generic_algorithms.py b/libtoprammer/generic_algorithms.py
index 030ea65..6fb2709 100644
--- a/libtoprammer/generic_algorithms.py
+++ b/libtoprammer/generic_algorithms.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from util import *
+from .util import *
class AddrSetter(object):
diff --git a/libtoprammer/hardware_access_usb.py b/libtoprammer/hardware_access_usb.py
index 774c572..1ccd199 100644
--- a/libtoprammer/hardware_access_usb.py
+++ b/libtoprammer/hardware_access_usb.py
@@ -20,12 +20,12 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from util import *
-from command_queue import *
+from .util import *
+from .command_queue import *
try:
import usb.core
import usb.util
-except (ImportError), e:
+except (ImportError) as e:
print("Python USB (PyUSB) support module not found.\n"
"Please install python-usb.")
sys.exit(1)
@@ -82,14 +82,14 @@ class HardwareAccessUSB(CommandQueue):
self.bulkIn.clear_halt()
self.bulkOut.clear_halt()
- except (usb.core.USBError), e:
+ except (usb.core.USBError) as e:
raise TOPException("USB error: " + str(e))
def shutdown(self):
"Shutdown the USB connection"
try:
usb.util.dispose_resources(self.usbdev)
- except (usb.core.USBError), e:
+ except (usb.core.USBError) as e:
raise TOPException("USB error: " + str(e))
def send(self, data):
@@ -105,7 +105,7 @@ class HardwareAccessUSB(CommandQueue):
if nrWritten != len(data):
raise TOPException("USB bulk write error: "
"short write")
- except (usb.core.USBError), e:
+ except (usb.core.USBError) as e:
raise TOPException("USB bulk write error: " + str(e))
def receive(self, size):
@@ -123,6 +123,6 @@ class HardwareAccessUSB(CommandQueue):
if self.doRawDump:
print("Received data:")
dumpMem(data)
- except (usb.core.USBError), e:
+ except (usb.core.USBError) as e:
raise TOPException("USB bulk read error: " + str(e))
return data
diff --git a/libtoprammer/ihex.py b/libtoprammer/ihex.py
index c837d85..361ac5b 100644
--- a/libtoprammer/ihex.py
+++ b/libtoprammer/ihex.py
@@ -20,7 +20,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from util import *
+from .util import *
class AddressRange(object):
diff --git a/libtoprammer/layout_generator.py b/libtoprammer/layout_generator.py
index 3f5bf9a..00241d6 100644
--- a/libtoprammer/layout_generator.py
+++ b/libtoprammer/layout_generator.py
@@ -20,8 +20,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from util import *
-from top_devices import *
+from .util import *
+from .top_devices import *
class LayoutGenerator:
@@ -35,13 +35,13 @@ class LayoutGenerator:
def setProgrammerType(self, programmer="TOP2049"):
supportedDevices = {
# Map deviceName : layoutModules, ZIF-pin-count
- "TOP2049" : (top2049.vcc_layouts, top2049.vpp_layouts,
- top2049.gnd_layouts, 48)
+ "TOP2049" : (top2049_vcc_layouts, top2049_vpp_layouts,
+ top2049_gnd_layouts, 48)
}
try:
(vcc_layouts, vpp_layouts, gnd_layouts, zifPins) = \
supportedDevices[programmer.upper()]
- except (KeyError), e:
+ except (KeyError) as e:
raise TOPException("Programmer " + programmer + " not supported")
self.vccLayout = vcc_layouts.VCCLayout()
self.vppLayout = vpp_layouts.VPPLayout()
@@ -153,7 +153,7 @@ class LayoutGenerator:
while offset >= 0:
try:
self.mapToZIF(offset, upsideDown)
- except (LayoutGenerator.MapError), e:
+ except (LayoutGenerator.MapError) as e:
offset -= 1
continue
return
@@ -334,5 +334,5 @@ def createLayoutGenerator(package):
if package.upper() == "PLCC44": # 1:1 adapter
return LayoutGeneratorDIP(44)
raise ValueError()
- except (ValueError), e:
+ except (ValueError) as e:
raise TOPException("Unknown package type " + package)
diff --git a/libtoprammer/main.py b/libtoprammer/main.py
index 8c8fd95..bea80e4 100644
--- a/libtoprammer/main.py
+++ b/libtoprammer/main.py
@@ -19,29 +19,26 @@
"""
import sys
-__pymajor = sys.version_info[0]
-__pyminor = sys.version_info[1]
-if __pymajor < 2 or (__pymajor == 2 and __pyminor < 6):
- print "FATAL: TOPrammer requires Python version 2.6. Please install Python 2.6"
+if sys.version_info[0] < 3:
+ print("FATAL: TOPrammer requires Python version 3.x. Please install Python 3.x")
sys.exit(1)
-
# TOPrammer version stamp
VERSION_MAJOR = 0
VERSION_MINOR = 17
VERSION = "%d.%d" % (VERSION_MAJOR, VERSION_MINOR)
-from bitfile import *
-from util import *
+from .bitfile import *
+from .util import *
import time
import re
-from hardware_access_usb import *
-from top_devices import *
-from chips import *
-from user_interface import *
+from .hardware_access_usb import *
+from .top_devices import *
+from .chips import *
+from .user_interface import *
class FoundDev(object):
@@ -159,7 +156,7 @@ class TOP(object):
toptype = {
(0x2471, 0x0853): TOP.TYPE_TOP2049,
}[ (usbdev.idVendor, usbdev.idProduct) ]
- except (KeyError), e:
+ except (KeyError) as e:
return None
return toptype
@@ -184,13 +181,13 @@ class TOP(object):
self.shutdownProgrammer()
if foundDev.toptype == self.TYPE_TOP2049:
- self.hw = top2049.hardware_access.HardwareAccess(
+ self.hw = top2049_hardware_access.HardwareAccess(
foundUSBDev = foundDev.busdata,
noQueue = noQueue,
doRawDump = (self.verbose >= 3))
- self.vcc = top2049.vcc_layouts.VCCLayout(self)
- self.vpp = top2049.vpp_layouts.VPPLayout(self)
- self.gnd = top2049.gnd_layouts.GNDLayout(self)
+ self.vcc = top2049_vcc_layouts.VCCLayout(self)
+ self.vpp = top2049_vpp_layouts.VPPLayout(self)
+ self.gnd = top2049_gnd_layouts.GNDLayout(self)
else:
assert(0)
self.topType = foundDev.toptype
@@ -204,7 +201,7 @@ class TOP(object):
try:
versionString = self.hw.readVersionString()
break
- except TOPException, e:
+ except TOPException as e:
time.sleep(0.05)
else:
raise TOPException("Could not read version string from hardware")
diff --git a/libtoprammer/top2049/gnd_layouts.py b/libtoprammer/top2049/gnd_layouts.py
index 3d60a49..c8bd453 100644
--- a/libtoprammer/top2049/gnd_layouts.py
+++ b/libtoprammer/top2049/gnd_layouts.py
@@ -51,5 +51,5 @@ class GNDLayout(GenericLayout):
self.top.cmdLoadGNDLayout(id)
if __name__ == "__main__":
- print "ZIF socket GND layouts"
- print GNDLayout()
+ print("ZIF socket GND layouts")
+ print(GNDLayout())
diff --git a/libtoprammer/top2049/vcc_layouts.py b/libtoprammer/top2049/vcc_layouts.py
index f28bb6d..ce81bdc 100644
--- a/libtoprammer/top2049/vcc_layouts.py
+++ b/libtoprammer/top2049/vcc_layouts.py
@@ -150,5 +150,5 @@ class VCCLayout(ShiftregLayout):
self.top.cmdLoadVCCLayout(id)
if __name__ == "__main__":
- print "ZIF socket VCC layouts"
- print VCCLayout()
+ print("ZIF socket VCC layouts")
+ print(VCCLayout())
diff --git a/libtoprammer/top2049/vpp_layouts.py b/libtoprammer/top2049/vpp_layouts.py
index bc9cef5..df12906 100644
--- a/libtoprammer/top2049/vpp_layouts.py
+++ b/libtoprammer/top2049/vpp_layouts.py
@@ -159,5 +159,5 @@ class VPPLayout(ShiftregLayout):
self.top.cmdLoadVPPLayout(id)
if __name__ == "__main__":
- print "ZIF socket VPP layouts"
- print VPPLayout(None)
+ print("ZIF socket VPP layouts")
+ print(VPPLayout(None))
diff --git a/libtoprammer/top_devices.py b/libtoprammer/top_devices.py
index 91ac1ab..26a8422 100644
--- a/libtoprammer/top_devices.py
+++ b/libtoprammer/top_devices.py
@@ -1,7 +1,7 @@
# Import programmer specific stuff
# TOP2049 specific stuff
-import top2049.hardware_access
-import top2049.vcc_layouts
-import top2049.vpp_layouts
-import top2049.gnd_layouts
+from libtoprammer.top2049 import hardware_access as top2049_hardware_access
+from libtoprammer.top2049 import vcc_layouts as top2049_vcc_layouts
+from libtoprammer.top2049 import vpp_layouts as top2049_vpp_layouts
+from libtoprammer.top2049 import gnd_layouts as top2049_gnd_layouts
diff --git a/libtoprammer/user_interface.py b/libtoprammer/user_interface.py
index ae7385e..8eff26d 100644
--- a/libtoprammer/user_interface.py
+++ b/libtoprammer/user_interface.py
@@ -55,7 +55,7 @@ class ConsoleUserInterface(AbstractUserInterface):
if meterId != self.PROGRESSMETER_CHIPACCESS:
return
self.progressNrSteps = nrSteps
- self.progress = range(0, 100)
+ self.progress = list(range(0, 100))
self.__genericConsoleMessage(message + " [0%", newline=False)
def progressMeterFinish(self, meterId):
@@ -87,7 +87,7 @@ class ConsoleUserInterface(AbstractUserInterface):
def __genericConsoleMessage(self, message, newline=True):
if newline:
- print message
+ print(message)
else:
sys.stdout.write(message)
sys.stdout.flush()
diff --git a/libtoprammer/util.py b/libtoprammer/util.py
index 39ae2ac..19de93e 100644
--- a/libtoprammer/util.py
+++ b/libtoprammer/util.py
@@ -29,24 +29,22 @@ import random
class TOPException(Exception): pass
-if sys.version_info[0] == 2: # Python 2.x
- def byte2int(byte):
- return ord(byte)
-
- def int2byte(integer):
- return chr(integer)
-else: # Python 3.x
- def byte2int(byte):
- return int(byte[0])
-
- def int2byte(integer):
- return bytes( (integer, ) )
+def byte2int(byte):
+ if isinstance(byte, int):
+ return byte
+ assert isinstance(byte, (bytes, bytearray))
+ return byte[0]
+
+def int2byte(integer):
+ if isinstance(integer, (bytes, bytearray)):
+ return bytes(integer)
+ assert isinstance(integer, int)
+ return bytes( (integer, ) )
def hex2bin(hexdata):
assert(len(hexdata) % 2 == 0)
- bindata = map(lambda i: int2byte(int(hexdata[i:i+2], 16)),
- range(0, len(hexdata), 2))
- return b"".join(bindata)
+ return b"".join(int2byte(int(hexdata[i:i+2], 16))
+ for i in range(len(hexdata), 2))
def byte2hex(byte):
return "%02X" % byte2int(byte)
@@ -54,7 +52,7 @@ def byte2hex(byte):
def bytes2hex(bindata):
if not bindata:
return ""
- return "".join(map(byte2hex, bindata))
+ return "".join(byte2hex(b) for b in bindata)
def byte2ascii(c):
ci = byte2int(c)
@@ -65,7 +63,7 @@ def byte2ascii(c):
def bytes2ascii(bindata):
if not bindata:
return ""
- return "".join(map(byte2ascii, bindata))
+ return "".join(byte2ascii(b) for b in bindata)
def str2bool(string):
string = str(string).lower().strip()
@@ -75,14 +73,13 @@ def str2bool(string):
return True
try:
return bool(int(string, 10))
- except (ValueError), e:
+ except (ValueError) as e:
pass
return None
def genRandomBlob(size):
- blob = map(lambda x: int2byte(random.randint(0, 0xFF)),
- range(0, size))
- return b"".join(blob)
+ return b"".join(int2byte(random.randint(0, 0xFF))
+ for x in range(size))
def bit(bitNr):
return 1 << bitNr
@@ -117,7 +114,7 @@ def parseHexdump(dump):
byte = int(bytes[i:i+2], 16)
bin.append(int2byte(byte))
return b"".join(bin)
- except (ValueError), e:
+ except (ValueError) as e:
raise TOPException("Invalid hexdump format (Integer error)")
def generateHexdump(mem):
@@ -151,7 +148,7 @@ class IO_ihex(object):
def autodetect(self, data):
try:
self.toBinary(data)
- except (TOPException), e:
+ except (TOPException) as e:
return False
return True
@@ -188,7 +185,7 @@ class IO_ihex(object):
checksum = checksum & 0xFF
if checksum != 0 and not checksumWarned:
checksumWarned = True
- print "WARNING: Invalid IHEX format (checksum error)"
+ print("WARNING: Invalid IHEX format (checksum error)")
if type == self.TYPE_EOF:
break
@@ -218,7 +215,7 @@ class IO_ihex(object):
if bin[offset] != defaultBytes[offset % len(defaultBytes)] and \
not doublewriteWarned:
doublewriteWarned = True
- print "Invalid IHEX format (Wrote twice to same location)"
+ print("Invalid IHEX format (Wrote twice to same location)")
bin[offset] = byte
continue
raise TOPException("Invalid IHEX format (unsup type %d)" % type)
@@ -258,7 +255,7 @@ class IO_ahex(object):
def autodetect(self, data):
try:
self.toBinary(data)
- except (TOPException), e:
+ except (TOPException) as e:
return False
return True
diff --git a/reverse-engineering/dump-parser.py b/reverse-engineering/dump-parser.py
index 916fb86..5981a0a 100755
--- a/reverse-engineering/dump-parser.py
+++ b/reverse-engineering/dump-parser.py
@@ -62,7 +62,7 @@ def dumpInstr(instr, description):
def parseBulkIn(data):
if len(data) == 64:
- print "Read buffer register"
+ print("Read buffer register")
dumpMem(data)
def parseBulkOut(data):
@@ -144,10 +144,10 @@ def parseBulkOut(data):
dumpInstr(data[i:i+2], "Unknown 0x4B")
i += 1
else:
- print "UNKNOWN INSTRUCTION 0x%02X. Aborting..." % data[i]
+ print("UNKNOWN INSTRUCTION 0x%02X. Aborting..." % data[i])
for j in range(i, len(data)):
sys.stdout.write("%02X " % data[j])
- print ""
+ print("")
sys.exit(1)
i += 1
@@ -189,7 +189,7 @@ def parseDumpFile(fd):
length = int(m.group(6))
def usage():
- print "dump-parser.py file.dump"
+ print("dump-parser.py file.dump")
def main(argv):
if len(argv) != 2:
diff --git a/setup.py b/setup.py
index 60bcd1b..10dc400 100755
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from distutils.core import setup
import libtoprammer.main as toprammer_main
diff --git a/toprammer b/toprammer
index bbeb40b..02fe3ad 100755
--- a/toprammer
+++ b/toprammer
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
# TOP2049 Open Source programming suite
#
@@ -27,66 +27,66 @@ import getopt
def usage():
- print "TOP2049 Open Source programming suite v%s" % VERSION
- print ""
- print "Usage: %s [OPTIONS] [ACTIONS]" % sys.argv[0]
- print ""
- print " -c|--chip-id The ID of the handled chip. (mandatory)"
- print " See -t|--list for a list of supported chips."
- print ""
- print "Optional:"
- print " -C|--chip-opt NAME=VAL Set a chip-id specific option."
- print " Use -c CHIPID -t to get a list of options."
- print ""
- print "Actions:"
- print " -s|--read-sig FILE Read the signature bytes"
- print " -x|--erase Erase the chip"
- print " -T|--test Run chip unit-test"
- print ""
- print " -p|--read-prog FILE Read the program memory"
- print " -P|--write-prog FILE Write the program memory"
- print ""
- print " -e|--read-eeprom FILE Read the EEPROM"
- print " -E|--write-eeprom FILE Write the EEPROM"
- print ""
- print " -f|--read-fuse FILE Read the fuse bits"
- print " -F|--write-fuse FILE Write the fuse bits"
- print ""
- print " -l|--read-lock FILE Read the lock bits"
- print " -L|--write-lock FILE Write the lock bits"
- print ""
- print " -r|--read-ram FILE Read the RAM"
- print " -R|--write-ram FILE Write the RAM"
- print ""
- print " -a|--read-uil FILE Read the User ID Location"
- print " -A|--write-uil FILE Write the User ID Location"
- print ""
- print "Other options:"
- print " -t|--list Print a list of supported chips and exit."
- print " Use -V|--verbose to control the list verbosity (0-4)"
- print " -d|--device DEVID Use a specific programmer. Example for USB:"
- print " usb:TOP2049:0"
- print " First found programmer is used, if not given."
- print " -V|--verbose LEVEL Set the verbosity level:"
- print " 0 => show warnings"
- print " 1 => also show informational messages (default)"
- print " 2 => also show debugging messages"
- print " 3 => also dump all USB commands"
- print " -o|--force LEVEL Set the force level. Default = 0"
- print " Note that any value greater than 0 may brick devices"
- print " -U|--force-upload Force upload the bitfile, even if it already appears"
- print " to be uploaded."
- print " -Q|--noqueue Disable command queuing. Really slow!"
- print " -B|--broken Also use broken algorithms"
- print " -I|--in-format FMT Input file format. Default = autodetect"
- print " -O|--out-format FMT Output file format. Default = bin"
- print ""
- print "File formats (FMT):"
- print " auto Autodetect. (input only)"
- print " bin Raw binary data"
- print " ihex Intel hex"
- print " ihex-raw Raw Intel hex (don't interpret sections)"
- print " ahex Hex with ASCII dump"
+ print("TOP2049 Open Source programming suite v%s" % VERSION)
+ print("")
+ print("Usage: %s [OPTIONS] [ACTIONS]" % sys.argv[0])
+ print("")
+ print(" -c|--chip-id The ID of the handled chip. (mandatory)")
+ print(" See -t|--list for a list of supported chips.")
+ print("")
+ print("Optional:")
+ print(" -C|--chip-opt NAME=VAL Set a chip-id specific option.")
+ print(" Use -c CHIPID -t to get a list of options.")
+ print("")
+ print("Actions:")
+ print(" -s|--read-sig FILE Read the signature bytes")
+ print(" -x|--erase Erase the chip")
+ print(" -T|--test Run chip unit-test")
+ print("")
+ print(" -p|--read-prog FILE Read the program memory")
+ print(" -P|--write-prog FILE Write the program memory")
+ print("")
+ print(" -e|--read-eeprom FILE Read the EEPROM")
+ print(" -E|--write-eeprom FILE Write the EEPROM")
+ print("")
+ print(" -f|--read-fuse FILE Read the fuse bits")
+ print(" -F|--write-fuse FILE Write the fuse bits")
+ print("")
+ print(" -l|--read-lock FILE Read the lock bits")
+ print(" -L|--write-lock FILE Write the lock bits")
+ print("")
+ print(" -r|--read-ram FILE Read the RAM")
+ print(" -R|--write-ram FILE Write the RAM")
+ print("")
+ print(" -a|--read-uil FILE Read the User ID Location")
+ print(" -A|--write-uil FILE Write the User ID Location")
+ print("")
+ print("Other options:")
+ print(" -t|--list Print a list of supported chips and exit.")
+ print(" Use -V|--verbose to control the list verbosity (0-4)")
+ print(" -d|--device DEVID Use a specific programmer. Example for USB:")
+ print(" usb:TOP2049:0")
+ print(" First found programmer is used, if not given.")
+ print(" -V|--verbose LEVEL Set the verbosity level:")
+ print(" 0 => show warnings")
+ print(" 1 => also show informational messages (default)")
+ print(" 2 => also show debugging messages")
+ print(" 3 => also dump all USB commands")
+ print(" -o|--force LEVEL Set the force level. Default = 0")
+ print(" Note that any value greater than 0 may brick devices")
+ print(" -U|--force-upload Force upload the bitfile, even if it already appears")
+ print(" to be uploaded.")
+ print(" -Q|--noqueue Disable command queuing. Really slow!")
+ print(" -B|--broken Also use broken algorithms")
+ print(" -I|--in-format FMT Input file format. Default = autodetect")
+ print(" -O|--out-format FMT Output file format. Default = bin")
+ print("")
+ print("File formats (FMT):")
+ print(" auto Autodetect. (input only)")
+ print(" bin Raw binary data")
+ print(" ihex Intel hex")
+ print(" ihex-raw Raw Intel hex (don't interpret sections)")
+ print(" ahex Hex with ASCII dump")
IO_handlers = {
"bin" : IO_binary,
@@ -169,8 +169,8 @@ def main(argv):
try:
v = v.split('=')
name, value = v[0], v[1]
- except (IndexError, ValueError), e:
- print "-C|--chip-opt invalid parameter"
+ except (IndexError, ValueError) as e:
+ print("-C|--chip-opt invalid parameter")
return 1
copt = AssignedChipOption(name, value)
opt_chipOptions.append(copt)
@@ -235,17 +235,17 @@ def main(argv):
if o in ("-A", "--write-uil"):
opt_action = "write-uil"
opt_file = v
- except (getopt.GetoptError, ValueError), e:
+ except (getopt.GetoptError, ValueError) as e:
usage()
return 1
if opt_action != "print-list" and not opt_chipID:
- print "-c|--chip-id is mandatory!"
+ print("-c|--chip-id is mandatory!")
return 1
if not opt_informat in ("auto", "bin", "ihex", "ihex-raw", "ahex"):
- print "Invalid -I|--in-format"
+ print("Invalid -I|--in-format")
return 1
if not opt_outformat in ("bin", "ihex", "ihex-raw", "ahex"):
- print "Invalid -O|--out-format"
+ print("Invalid -O|--out-format")
return 1
try:
@@ -298,10 +298,10 @@ def main(argv):
top.writeUserIdLocation(fileIn(top, opt_action, opt_file, opt_informat))
else:
if opt_verbose >= 1:
- print "No action specified"
+ print("No action specified")
top.shutdownChip()
- except (TOPException, BitfileException, IOError), e:
- print e
+ except (TOPException, BitfileException, IOError) as e:
+ print(e)
return 1
return 0
diff --git a/toprammer-gui b/toprammer-gui
index c308677..bfe70dc 100755
--- a/toprammer-gui
+++ b/toprammer-gui
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
# TOP2049 Open Source programming suite
#
@@ -26,13 +26,13 @@ from libtoprammer.util import *
import sys
import time
import cgi
-import ConfigParser
+import configparser
try:
from PySide.QtCore import *
from PySide.QtGui import *
-except (ImportError), e:
- print "Failed to import PySide modules: %s" % str(e)
- print "Please install PySide. On Debian Linux run: aptitude install python-pyside"
+except (ImportError) as e:
+ print("Failed to import PySide modules: %s" % str(e))
+ print("Please install PySide. On Debian Linux run: aptitude install python-pyside")
sys.exit(1)
@@ -158,7 +158,7 @@ class ZifWidget(QGroupBox):
def readInputs(self):
try:
inputMask = self.unitest.queryTop("top.getChip().getInputs()")
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "TOP communication failed",
"Failed to fetch input states:\n" +\
str(e))
@@ -194,7 +194,7 @@ class ZifWidget(QGroupBox):
try:
self.unitest.queryTop("top.getChip().setOutputEnableMask(...)",
outEnMask)
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "TOP communication failed",
"Failed to set output-enable states:\n" +\
str(e))
@@ -208,7 +208,7 @@ class ZifWidget(QGroupBox):
try:
self.unitest.queryTop("top.getChip().setOutputs(...)",
outMask)
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "TOP communication failed",
"Failed to set output states:\n" +\
str(e))
@@ -285,7 +285,7 @@ class UnitestDialog(QDialog):
self.param_oscFreq = self.queryTop("top.getOscillatorHz()")
assert(self.param_nrZifPins % 2 == 0)
- self.param_vppLayouts.sort(key=lambda (layId, layMask): layMask)
+ self.param_vppLayouts.sort(key=lambda layId_layMask: layId_layMask[1])
self.menuBar = QMenuBar(self)
self.menuBar.addAction("&Load settings...", self.loadSettings)
@@ -433,7 +433,7 @@ class UnitestDialog(QDialog):
def __readFcntValue(self):
try:
self.fcntValue = self.queryTop("top.getChip().getFreqCount()")
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "TOP communication failed",
"Failed to read frequency counter value:\n" +\
str(e))
@@ -483,7 +483,7 @@ class UnitestDialog(QDialog):
def __loadFile(self, filename):
try:
- p = ConfigParser.SafeConfigParser()
+ p = configparser.SafeConfigParser()
p.read((filename,))
sect = "TOPRAMMER-UNITEST-SETTINGS"
@@ -515,7 +515,7 @@ class UnitestDialog(QDialog):
self.vccVoltage.setValue(voltage)
layouts = p.get(sect, "vppLayout").split(",")
- for layId in self.vppLayouts.keys():
+ for layId in list(self.vppLayouts.keys()):
if layId in layouts:
self.vppLayouts[layId].setCheckState(Qt.Checked)
else:
@@ -567,7 +567,7 @@ class UnitestDialog(QDialog):
raise TOPException("Invalid fcntPin")
self.fcntPin.setCurrentIndex(idx)
- except (ConfigParser.Error, TOPException, ValueError), e:
+ except (configparser.Error, TOPException, ValueError) as e:
QMessageBox.critical(self, "Failed to load settings",
"Failed to load settings: %s" % str(e))
@@ -593,7 +593,7 @@ class UnitestDialog(QDialog):
fd.write("vccLayout=%d\r\n" % self.vccLayout.itemData(idx))
fd.write("vccVoltage=%f\r\n" % self.vccVoltage.value())
vppLayouts = ""
- for layId in self.vppLayouts.keys():
+ for layId in list(self.vppLayouts.keys()):
if self.vppLayouts[layId].checkState() == Qt.Checked:
if vppLayouts:
vppLayouts += ","
@@ -616,7 +616,7 @@ class UnitestDialog(QDialog):
fd.write("oscillatorDiv=%d\r\n" % self.oscDiv.value())
fd.write("zifOutEnMask=%X\r\n" % self.zifWidget.getOutEnMask())
fd.write("zifOutMask=%X\r\n" % self.zifWidget.getOutMask())
- except (IOError), e:
+ except (IOError) as e:
QMessageBox.critical(self, "Failed to save settings",
"Failed to write settings to file: %s" % str(e))
@@ -666,7 +666,7 @@ class UnitestDialog(QDialog):
lay = self.vccLayout.itemData(idx)
blockedPins.extend(self.queryTop("top.vcc.ID2pinlist(...)", lay))
# VPP
- for key in self.vppLayouts.keys():
+ for key in list(self.vppLayouts.keys()):
if self.vppLayouts[key].checkState() == Qt.Checked:
blockedPins.extend(self.queryTop("top.vpp.ID2pinlist(...)", key))
# OSC
@@ -690,7 +690,7 @@ class UnitestDialog(QDialog):
selLayout = self.gndLayout.itemData(idx)
try:
self.queryTop("top.getChip().setGND(...)", selLayout)
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "TOP communication failed",
"Failed to set GND layout:\n" +\
str(e))
@@ -705,7 +705,7 @@ class UnitestDialog(QDialog):
selLayout = self.vccLayout.itemData(idx)
try:
self.queryTop("top.getChip().setVCC(...)", selVoltage, selLayout)
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "TOP communication failed",
"Failed to set VCC layout:\n" +\
str(e))
@@ -717,12 +717,12 @@ class UnitestDialog(QDialog):
return
selVoltage = self.vppVoltage.value()
selLayouts = []
- for key in self.vppLayouts.keys():
+ for key in list(self.vppLayouts.keys()):
if self.vppLayouts[key].checkState() == Qt.Checked:
selLayouts.append(key)
try:
self.queryTop("top.getChip().setVPP(...)", selVoltage, selLayouts)
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "TOP communication failed",
"Failed to set VPP layout:\n" +\
str(e))
@@ -781,7 +781,7 @@ class UnitestDialog(QDialog):
self.switchMode(Chip_Unitest.MODE_UNITEST)
self.__updateFcntValueLabel()
self.inputPollEn.setEnabled(True)
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "TOP communication failed",
"Failed configure frequency counter:\n" +\
str(e))
@@ -797,7 +797,7 @@ class UnitestDialog(QDialog):
idx = self.oscPin.currentIndex()
mask = self.oscPin.itemData(idx).obj
self.queryTop("top.getChip().setOscMask(...)", mask)
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "TOP communication failed",
"Failed configure oscillator:\n" +\
str(e))
@@ -942,7 +942,7 @@ class HwThread(QThread):
# Make sure the device is in a consistent state.
self.__blockCancellation()
if self.top:
- print "Operation cancelled. Resetting chip."
+ print("Operation cancelled. Resetting chip.")
self.top.resetChip()
self.__unblockCancellation()
@@ -962,12 +962,12 @@ class HwThread(QThread):
self.cancellationBlocked = 0
result = self.__runTask(self.task)
failed = False
- except (TOPException), e:
+ except (TOPException) as e:
result = e
- except (HwThread.CancelException), e:
+ except (HwThread.CancelException) as e:
self.__doCancelTask()
result = e
- except (Exception), e:
+ except (Exception) as e:
result = e
self.appendMessage("finished", (self.opaqueId, failed, result),
nocancel=True)
@@ -1130,7 +1130,7 @@ class Console(QDockWidget):
if running:
self.setStatus(Console.STAT_PROGRESS)
# Set progress meters to "busy"
- for meterId in self.idToProgressBar.keys():
+ for meterId in list(self.idToProgressBar.keys()):
self.progressMeterInit(meterId, 0)
else:
if success:
@@ -1138,7 +1138,7 @@ class Console(QDockWidget):
else:
self.setStatus(Console.STAT_ERROR)
# Reset progress meters to 0%
- for meterId in self.idToProgressBar.keys():
+ for meterId in list(self.idToProgressBar.keys()):
self.progressMeterInit(meterId, 2)
def setStatus(self, status):
@@ -1565,7 +1565,7 @@ class InfoBufferWidget(BufferWidget):
return text
if packages:
- pckgs = map(p2str, packages)
+ pckgs = list(map(p2str, packages))
self.packages.setText("\n".join(pckgs))
else:
self.packages.setText("Unknown")
@@ -1637,8 +1637,7 @@ class BitBufferWidget(BufferWidget):
self.bitDescriptionsAttr, None)
if not bitDescList:
return ""
- bitDesc = filter(lambda x: x.bitNr == bitNr,
- bitDescList)
+ bitDesc = [x for x in bitDescList if x.bitNr == bitNr]
if not bitDesc:
return ""
return bitDesc[0].description
@@ -1940,14 +1939,12 @@ class ChipSelectDialog(QDialog):
vendors = getRegisteredVendors()
self.vendorList.clear()
QListWidgetItem(self.ALL_VENDORS, self.vendorList)
- for vendorName in vendors.keys():
+ for vendorName in list(vendors.keys()):
descriptors = vendors[vendorName]
if self.showBroken.checkState() != Qt.Checked:
- descriptors = filter(lambda d: not d.broken,
- descriptors)
- descriptors = filter(lambda d: (d.chipType == selType or selType == -1) and\
- (d.chipType != ChipDescription.TYPE_INTERNAL),
- descriptors)
+ descriptors = [d for d in descriptors if not d.broken]
+ descriptors = [d for d in descriptors if (d.chipType == selType or selType == -1) and\
+ (d.chipType != ChipDescription.TYPE_INTERNAL)]
if not descriptors:
continue
item = QListWidgetItem(vendorName, self.vendorList)
@@ -2450,7 +2447,7 @@ class MainWindow(QMainWindow):
try:
dlg = UnitestDialog(self)
dlg.exec_()
- except (TOPException), e:
+ except (TOPException) as e:
self.console.showMessage("Failed to start Unitest: %s\n" % str(e),
bold=True)
self.console.unblockStatusUpdate()
@@ -2525,7 +2522,7 @@ class MainWindow(QMainWindow):
split(")")[0].replace("*", "").strip().split()
try:
dataIn = open(fn, "rb").read()
- except (IOError), e:
+ except (IOError) as e:
QMessageBox.critical(self, "Failed to read file",
"Failed to read %s:\n%s" %\
(str(fn), str(e.strerror)))
@@ -2568,7 +2565,7 @@ class MainWindow(QMainWindow):
if not ok:
QMessageBox.critical(self, "Failed to load data",
"Failed to load the file into the buffer")
- except (TOPException), e:
+ except (TOPException) as e:
QMessageBox.critical(self, "Failed to convert data",
"Failed to convert the input file data to binary\n%s" % str(e))
return
@@ -2605,7 +2602,7 @@ class MainWindow(QMainWindow):
assert(0)
try:
open(fn, "wb").write(data)
- except (IOError), e:
+ except (IOError) as e:
QMessageBox.critical(self, "Failed to write file",
"Failed to write %s:\n%s" %\
(str(fn), str(e.strerror)))
@@ -2861,7 +2858,7 @@ class MainWindow(QMainWindow):
elif op.op == Operation.OP_RAWCOMMAND:
self.console.showMessage("Successfully sent raw command\n", bold=True)
else:
- print "ERROR: No handler for op %d task %d" % (op.op, op.hwTask)
+ print("ERROR: No handler for op %d task %d" % (op.op, op.hwTask))
self.setOperationFinished(op.failed)
def hardwareTaskFinished(self, opaqueId, failed, returnValue):
diff --git a/toprammer-layout b/toprammer-layout
index 25d7fc5..98e729f 100755
--- a/toprammer-layout
+++ b/toprammer-layout
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
# TOP2049 Open Source programming suite
#
@@ -36,26 +36,26 @@ class FakeTOP(object):
return self.topType
def usage():
- print "Toprammer ZIF socket layout generator v%s" % VERSION
- print ""
- print "Usage: %s [OPTIONS]" % sys.argv[0]
- print ""
- print "Mandatory options:"
- print " -d|--device TOPxxxx The TOPxxxx device that is used."
- print " Possible choices are: TOP2049"
- print " -p|--package DIPxx The package type of the DUT."
- print " Package may also be the name of a supported chip."
- print " In this case, --vcc, --vpp and --gnd are ignored."
- print " -v|--vcc PIN Set VCC pin number, relative to the package."
- print " -P|--vpp PIN(s) Set VPP pin number(s), relative to the package."
- print " May be one pin number or a comma separated list of pin numbers."
- print " May be omitted or NONE, if no VPP pin is required."
- print " -g|--gnd PIN Set GND pin number, relative to the package."
- print ""
- print "Optional:"
- print " -h|--help Print this help text"
- print " -I|--only-insert Only show insert-layout"
- print " -S|--only-supply Only show supply-layout"
+ print("Toprammer ZIF socket layout generator v%s" % VERSION)
+ print("")
+ print("Usage: %s [OPTIONS]" % sys.argv[0])
+ print("")
+ print("Mandatory options:")
+ print(" -d|--device TOPxxxx The TOPxxxx device that is used.")
+ print(" Possible choices are: TOP2049")
+ print(" -p|--package DIPxx The package type of the DUT.")
+ print(" Package may also be the name of a supported chip.")
+ print(" In this case, --vcc, --vpp and --gnd are ignored.")
+ print(" -v|--vcc PIN Set VCC pin number, relative to the package.")
+ print(" -P|--vpp PIN(s) Set VPP pin number(s), relative to the package.")
+ print(" May be one pin number or a comma separated list of pin numbers.")
+ print(" May be omitted or NONE, if no VPP pin is required.")
+ print(" -g|--gnd PIN Set GND pin number, relative to the package.")
+ print("")
+ print("Optional:")
+ print(" -h|--help Print this help text")
+ print(" -I|--only-insert Only show insert-layout")
+ print(" -S|--only-supply Only show supply-layout")
def main(argv):
package = None
@@ -96,10 +96,10 @@ def main(argv):
showInsert = False
showSupply = True
if not programmer:
- print "-d|--device is mandatory!\n"
+ print("-d|--device is mandatory!\n")
raise ValueError()
if not package:
- print "-p|--package is mandatory!\n"
+ print("-p|--package is mandatory!\n")
raise ValueError()
generator = None
@@ -108,27 +108,27 @@ def main(argv):
package, allowBroken=True)
chip = chipDesc.chipImplClass.createInstance(
FakeTOP(programmer), chipDesc)
- except (TOPException), e:
+ except (TOPException) as e:
chip = None
if vccPin is None or gndPin is None:
- print "-v|--vcc and -g|--gnd " +\
- "are mandatory, if a package type is specified.\n"
+ print("-v|--vcc and -g|--gnd " +\
+ "are mandatory, if a package type is specified.\n")
raise ValueError()
- except (getopt.GetoptError, ValueError, KeyError), e:
+ except (getopt.GetoptError, ValueError, KeyError) as e:
usage()
return 1
- except (TOPException), e:
- print e
+ except (TOPException) as e:
+ print(e)
return 1
try:
if chip:
try:
generator = chip.generator
- except (AttributeError), e:
- print "The chip %s does not have a layout autogenerator. "\
+ except (AttributeError) as e:
+ print("The chip %s does not have a layout autogenerator. "\
"You must specify the package type, -v, -P and -g manually." %\
- package
+ package)
return 1
else:
generator = createLayoutGenerator(package)
@@ -136,13 +136,13 @@ def main(argv):
generator.setPins(vccPin, vppPins, gndPin)
generator.recalculate()
if showInsert:
- print "Chip insert layout:\n"
- print generator.zifLayoutAsciiArt()
+ print("Chip insert layout:\n")
+ print(generator.zifLayoutAsciiArt())
if showSupply:
- print "\nSupply voltage pins on the ZIF:\n"
- print generator.zifPinAssignments()
- except (TOPException), e:
- print e
+ print("\nSupply voltage pins on the ZIF:\n")
+ print(generator.zifPinAssignments())
+ except (TOPException) as e:
+ print(e)
return 1
return 0
bues.ch cgit interface