Received: from PCH.mit.edu (18.7.21.50) by mail.efplus.com (192.168.0.8) with Microsoft SMTP Server (TLS) id 8.3.485.1; Tue, 29 Sep 2020 22:06:31 -0700 Received: from PCH.MIT.EDU (localhost.localdomain [127.0.0.1]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 08U4qE9Y001442; Wed, 30 Sep 2020 00:52:41 -0400 Received: from outgoing-exchange-1.mit.edu (OUTGOING-EXCHANGE-1.MIT.EDU [18.9.28.15]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 08U4NYUn030913 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 30 Sep 2020 00:23:39 -0400 Received: from w92exedge3.exchange.mit.edu (W92EXEDGE3.EXCHANGE.MIT.EDU [18.7.73.15]) by outgoing-exchange-1.mit.edu (8.14.7/8.12.4) with ESMTP id 08U4Mq6V027490 for ; Wed, 30 Sep 2020 00:23:39 -0400 Received: from w92expo30.exchange.mit.edu (18.7.74.42) by w92exedge3.exchange.mit.edu (18.7.73.15) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Wed, 30 Sep 2020 00:22:34 -0400 Received: from oc11exhyb6.exchange.mit.edu (18.9.1.111) by w92expo30.exchange.mit.edu (18.7.74.42) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Wed, 30 Sep 2020 00:23:11 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by oc11exhyb6.exchange.mit.edu (18.9.1.111) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Wed, 30 Sep 2020 00:23:11 -0400 Received: from DM5PR13CA0020.namprd13.prod.outlook.com (2603:10b6:3:23::30) by MW4PR01MB6228.prod.exchangelabs.com (2603:10b6:303:76::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34; Wed, 30 Sep 2020 04:23:10 +0000 Received: from DM3NAM03FT065.eop-NAM03.prod.protection.outlook.com (2603:10b6:3:23:cafe::90) by DM5PR13CA0020.outlook.office365.com (2603:10b6:3:23::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.13 via Frontend Transport; Wed, 30 Sep 2020 04:23:09 +0000 Received: from lister.audiovisualdevices.com.au (59.167.208.207) by DM3NAM03FT065.mail.protection.outlook.com (10.152.82.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Wed, 30 Sep 2020 04:23:07 +0000 Received: from [192.168.0.119] ([192.168.0.254]) (authenticated bits=0) by lister.audiovisualdevices.com.au (8.15.2/8.15.2/Debian-8) with ESMTPSA id 08U4N4lg006010 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Wed, 30 Sep 2020 14:23:04 +1000 From: "David Duffy (AVD)" To: Microcontroller discussion list - Public. Sender: "piclist-bounces@mit.edu" Date: Tue, 29 Sep 2020 21:22:57 -0700 Subject: Re: [PIC] 18F...K22, K42, K40 Thread-Topic: [PIC] 18F...K22, K42, K40 Thread-Index: AdaW53aGXPpAG9MgT3iFGl7YM8tBug== Message-ID: References: <5F740009.9050802@narwani.org> List-Help: List-Subscribe: , List-Unsubscribe: , In-Reply-To: <5F740009.9050802@narwani.org> Reply-To: Microcontroller discussion list - Public. Accept-Language: en-US Content-Language: en-US X-MS-Exchange-Organization-AuthAs: Anonymous X-MS-Exchange-Organization-AuthSource: TS500.efplus4.local X-MS-Has-Attach: X-Auto-Response-Suppress: All X-MS-Exchange-Organization-SenderIdResult: Pass X-MS-Exchange-Organization-PRD: mit.edu X-MS-TNEF-Correlator: received-spf: Pass (protection.outlook.com: domain of audiovisualdevices.com.au designates 59.167.208.207 as permitted sender) receiver=protection.outlook.com; client-ip=59.167.208.207; helo=lister.audiovisualdevices.com.au; dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mitprod.onmicrosoft.com; s=selector2-mitprod-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=03NRPsUX1A9aaZTXUT5EEfPjDjaqD0HcgtVYuObWT1Q=; b=CyiJCPRir4w8s0VKqVxW2NTbZcKY2/nuKhjfA5ZGfzNyDkMpMRrXN8ESuuwJ+w2Z8jydpbbkLXiPundZf7bDQ9Gnl7moDWHpAoKG8k1kRBlVm0zUjdw62Li7tMA9tikyEnRM2uGzYLvZGrNf80uqG+MyXRrLLr4EkTb9FF3X3yc= authentication-results: spf=pass (sender IP is 59.167.208.207) smtp.mailfrom=audiovisualdevices.com.au; mit.edu; dkim=none (message not signed) header.d=none;mit.edu; dmarc=bestguesspass action=none header.from=audiovisualdevices.com.au; user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 errors-to: piclist-bounces@mit.edu list-id: "Microcontroller discussion list - Public." list-post: x-beenthere: piclist@mit.edu x-mailman-version: 2.1.6 x-spam-status: No, hits=-2.001 required=5 tests=ALL_TRUSTED, BAYES_00, NICE_REPLY_A, SUBJ_ALL_CAPS x-virus-status: No x-topics: [PIC] x-mailman-approved-at: Wed, 30 Sep 2020 00:52:13 -0400 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 I've done it this way: __EEPROM_DATA(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); // 0x00..0x0= 7 David... On 30/09/2020 1:48 pm, Neil wrote: > Looking at doing a project for someone who chose the PIC18LF45K40. > I remember a few years ago when I moved from K22 to K42 (to get the > 12-bit ADC), there was an issue with pre-initializing EEPROM data, but > IIRC that had to do with MPLABX (vs MPLAB) and not an issue with the chip= .. > I did some workaround with looking for a key value in a specific EEPROM > location and if not there, it went through an initialization routine. > Being able to set different configurations in the code (using #define), > which then set specific values in EEPROM made life much easier. > > With the K40, looks like I'm forced to use MPLABX, though for a 3rd > party, I probably should suck up my hatred of MPLABX and use the newer > tools. > > That said... anyone know if I can pre-initialize EEPROM from MPLABX > nowadays? > PS: I don't want to manually punch in values into MPLABX IPE. > > Cheers, > -Neil. > > --=20 ___________________________________________ David Duffy Audio Visual Devices P/L Unit 8, 10 Hook St, Capalaba 4157 Australia Ph: +61 7 38235717 Fax: +61 7 38234717 Our Web Site: www.audiovisualdevices.com.au ___________________________________________ --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .