>I'm new to the Piclist, so apologies if this has already been discussed: > >Is there any reason why the PICs can't access the stack? I'm planning to >build a cheap and cheerful ICE out of an '84 incorporating a small resident >monitor. Of course, there's no way to follow the program counter position in >the code - I'll have to write a simulator to keep track of the p.c. while >single-stepping. If the stack were available, it'd be easy. I presume that the reason why the Stack isn't be accessed is because it is in a separate memory area (which is LIFO) is because of the complexity of creating an interface to each of the 12/14/16 bit Stack elements. >Are there any inexpensive emulators based on this approach? The short answer to this is "no"; you need "Bondout" chips to do this. A good question would be, would Microchip make Bondout chips available to hobbyists/small companies (along with datasheets) to allow the design and implementation of simple emulators? The long answer is; I built/designed a simple emulator for the 16C61/71/84 (without EEPROM access), it was based on a 16C73A running at 10 MHz, with storing data on a Serial EEPROM. It interfaces to a host terminal via RS-232 at 9600 bps. It has a built in assembler and can accept .HEX files downloaded. It works fairly acceptably to emulate these PICs, but the actual speed is about 10 KHz (One of these days I'll redesign it to use an SPI EEPROM, rather than an I2C EEPROM and find a ceramic resonator that runs at 20 MHz, which should give me at least an order of magnitude improvement in performance). One of the problems with my emulator is that it does not accurately emulate the instruction timings of the PIC. To do that, I would have had to drop the actual speed (note that it cannot emulate other speeds) to 5 KHz. Unfortunately, the PIC architecture is really not well suited to simple emulators/monitors (debuggers). >PS. I wonder if off-topic messages will be excluded from the Digest - I hope >so. Perhaps there could be a seperate OT digest. Hmmmm... How about dropping the off topic discussions about off topic discussions? Ironically, the worst offenders right now are the people who are writing about "other" off topic offenders. myke "One must invoke enough raw truth to punch a hole in the world" - Darl Af