From PICLIST@MITVMA.MIT.EDU Thu Nov 14 12:34:47 2002 Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-7.13) id A8E7DFB00F6; Thu, 14 Nov 2002 12:34:47 -0800 Received: from PEAR.EASE.LSOFT.COM (209.119.0.19) by cherry.ease.lsoft.com (LSMTP for Digital Unix v1.1b) with SMTP id <2.007D8B9F@cherry.ease.lsoft.com>; Thu, 14 Nov 2002 15:20:51 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8d) with spool id 0863 for PICLIST@MITVMA.MIT.EDU; Thu, 14 Nov 2002 15:20:41 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 9541; Thu, 14 Nov 2002 15:20:21 -0500 Received: from ns1.cypress.com [157.95.67.4] by mitvma.mit.edu (IBM VM SMTP Level 320) via TCP with ESMTP ; Thu, 14 Nov 2002 15:20:20 EST X-Comment: mitvma.mit.edu: Mail was sent by ns1.cypress.com Received: from corpmail.cypress.com (corpmail [157.95.1.2]) by ns1.cypress.com (8.12.1/8.12.5) with ESMTP id gAEKJLax015873 for ; Thu, 14 Nov 2002 12:19:21 -0800 (PST) Received: from kenmore.ipdsd.cypress.com (kenmore.ipdsd.cypress.com [157.95.129.67]) by corpmail.cypress.com (8.12.5/8.12.5) with ESMTP id gAEKBS63002368 for ; Thu, 14 Nov 2002 12:11:29 -0800 (PST) Received: from aiw ([157.95.129.88]) by kenmore.ipdsd.cypress.com (8.11.6+Sun/8.11.6) with ESMTP id gAEKKD101115 for ; Thu, 14 Nov 2002 12:20:13 -0800 (PST) MIME-Version: 1.0 Priority: normal References: X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Message-ID: <3DD396A4.23632.FF1C524@localhost> Date: Thu, 14 Nov 2002 12:27:16 -0800 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: Andrew Warren Organization: Cypress Semiconductor Subject: Re: [PIC]: Detecting SRAM and eeprom To: PICLIST@MITVMA.MIT.EDU In-Reply-To: X-RCPT-TO: Status: R X-UIDL: 277600500 X-Evolution-Source: pop://mailinglist%40farcite.net@mail.farcite.net/ X-Evolution: 000006d9-0000 Dale Botkin wrote: > Read location XX > Save original value > XOR data read with 0xFF > Write XORed pattern to loction XX > Read location XX > See if it's what you wrote (if so, it's RAM/EEPROM) > Write original contents back to location XX > Increment XX by some value, like 256 or whatever. Dale: A memory-detection algorithm must properly handle cases in which the full address bus isn't decoded (e.g., only the lower 8 bits are decoded, so a write to address 255 is the same as a write to address 511). It must also not be fooled by bus capacitance; if the bus floats, capacitance can cause a read from a non-existent memory location to show the last value written to the bus. Your method is simpler than Peter's but it doesn't handle either of those cases. -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics