summaryrefslogtreecommitdiffstats
path: root/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
diff options
context:
space:
mode:
Diffstat (limited to 'libtoprammer/chips/microchip16/pic24f04ka200dip14.py')
-rw-r--r--libtoprammer/chips/microchip16/pic24f04ka200dip14.py57
1 files changed, 18 insertions, 39 deletions
diff --git a/libtoprammer/chips/microchip16/pic24f04ka200dip14.py b/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
index 7211aaa..beafad5 100644
--- a/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
+++ b/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
@@ -1,7 +1,7 @@
"""
# TOP2049 Open Source programming suite
#
-# Microchip PIC24f04ka200 DIP18
+# Microchip PIC24f04ka200 DIP14
#
# Copyright (c) 2013 Pavel Stemberk <stemberk@gmail.com>
#
@@ -21,14 +21,17 @@
"""
from microchip16_common import *
+from configWords import ka200_fuseDesc
class Chip_Pic24f04ka200dip14(Chip_Microchip16_common):
- voltageVDD = 3
- voltageVPP = 7.75
+ voltageVDD = 3.3
+ voltageVPP = 8
logicalFlashProgramMemorySize = 0x800000
- logicalFlashConfigurationMemorySize = 0x800000
+ logicalFlashConfigurationMemorySize = 0x800000
+
+ hasEEPROM = False
def __init__(self):
Chip_Microchip16_common.__init__(self,
@@ -36,45 +39,21 @@ class Chip_Pic24f04ka200dip14(Chip_Microchip16_common):
chipPinVCC=14,
chipPinsVPP=1,
chipPinGND=13,
- signature="\x02\x84",
- flashPageSize=0x200,
+ signature="\x02\x0d",
+ # flashPageSize (in number of 24bit words)
+ flashPageSize=0xAFE / 2 + 2,
+ # flashPageSize=0x40,
flashPages=1,
- eepromPageSize=64,
- eepromPages=1,
- fuseBytes=16 * 2
+ # 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
-
- def getIHexInterpreter(self):
- inter = IHexInterpreter()
- inter.progmemRanges = [ AddressRange(0, 2 * self.flashPageSize) ]
- inter.fuseRanges = [ AddressRange(2 * self.configWordAddr,
- 2 * self.configWordAddr + 1) ]
- return inter
-
- def sendWriteFlashInstr(self):
- '''
- '''
- self.sendInstr(self.CMD_BEGIN_PROGRAMMING_ONLY_CYCLE)
- self.top.hostDelay(self.delayTinternalProgDM)
-fuseDesc = (
- BitDescription(0, "FOSC[0], 00=LP osc, 01=XT osc"),
- BitDescription(1, "FOSC[1], 10=HS osc, 11=RC osc"),
- BitDescription(2, "WDTEN, 1=WDT enabled"),
- BitDescription(3, "nPWRT"),
- BitDescription(4, "nCP"),
- BitDescription(5, "nCP"),
- BitDescription(6, "nCP"),
- BitDescription(7, "nCP"),
- BitDescription(8, "nCP"),
- BitDescription(9, "nCP"),
- BitDescription(10, "nCP"),
- BitDescription(11, "nCP"),
- BitDescription(12, "nCP"),
- BitDescription(13, "nCP"),
-)
+fuseDesc = ka200_fuseDesc
ChipDescription(
Chip_Pic24f04ka200dip14,
@@ -82,7 +61,7 @@ ChipDescription(
chipID="pic24f04ka200dip14",
runtimeID=(0xDF01, 0x01),
chipVendors="Microchip",
- description="PIC24F04KA200 - experimental mode !!!",
+ description="PIC24F04KA200",
packages=(("DIP14", ""),),
fuseDesc=fuseDesc,
maintainer="Pavel Stemberk <stemberk@gmail.com>",
bues.ch cgit interface