From 3479b3013ec567fe451e25c018a1e6609304f072 Mon Sep 17 00:00:00 2001 From: Pavel Štemberk Date: Sat, 22 Feb 2014 17:45:15 +0100 Subject: Add support for pic24f PIC24F04KA200, PIC24F04KA201 PIC24F16KL402, PIC24F08KL402, PIC24F16KL401, PIC24F08KL401, PIC24F08KL302, PIC24F08KL301, PIC24F08KL201, PIC24F08KL200, PIC24F04KL101, PIC24F04KL100 Signed-off-by: Michael Buesch --- .../chips/microchip16/pic24f08kl402dip28.py | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 libtoprammer/chips/microchip16/pic24f08kl402dip28.py (limited to 'libtoprammer/chips/microchip16/pic24f08kl402dip28.py') diff --git a/libtoprammer/chips/microchip16/pic24f08kl402dip28.py b/libtoprammer/chips/microchip16/pic24f08kl402dip28.py new file mode 100644 index 0000000..aaf6b95 --- /dev/null +++ b/libtoprammer/chips/microchip16/pic24f08kl402dip28.py @@ -0,0 +1,66 @@ +""" +# TOP2049 Open Source programming suite +# +# Microchip PIC24f08kl402 DIP28 +# +# Copyright (c) 2014 Pavel Stemberk +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +""" + +from microchip16_common import * +from configWords import klx0x_fuseDesc + +class Chip_Pic24f08kl402dip28(Chip_Microchip16_common): + + voltageVDD = 3.3 + voltageVPP = 8 + + logicalFlashProgramMemorySize = 0x800000 + 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 + ) + self.configWordAddr = 0xF80000 + # self.osccalBackupAddr = self.userIDLocationAddr + self.userIDLocationSize + +fuseDesc = klx0x_fuseDesc + +ChipDescription( + Chip_Pic24f08kl402dip28, + bitfile="microchip16dip28", + chipID="pic24f08kl402dip28", + runtimeID=(0xDF02, 0x01), + chipVendors="Microchip", + description="PIC24F08KL402", + packages=(("DIP28", ""),), + fuseDesc=fuseDesc, + maintainer="Pavel Stemberk ", +) -- cgit v1.2.3