There is lots of code out there for async communications. Implementing a bi-directional serial interface on one wire is a little tricky, though. Just define the timing and communication protocol before you start writing PIC code. Look at some other 1-wire interface schemes for ideas. However, a 2-wire interface is much, much easier to implement! Reading and writing the register contents is easy using indirect addressing. I implemented this in a 16C74 that was used to control battery charging and power management for a portable PC design. I used the PSP for the interface to the ISA bus. A low-power PAL decodes the (single) IO address. The BIOS has the ability to control some aspects of the PIC's functions, it is able to read all registers in the PIC, and also write to some of the registers (the PIC code was designed to ignore attempted writes except to a block of about 16 locations). This made it possible to add APM support to the computers BIOS. Unfortunately, I cannot provide any code - the client owns it. I doubt it is possible to implement other ICE functions this way. Other than brute force (loading the PC with received data) I don't think program flow control is at all possible. Good luck with your project. Dave Morgan Olsson wrote: > Have anyone designed a one pin interface? > > It would be nice to have a simple monitor suopport program in every PIC, so > if we want to check inside it when it is working (or working wrong) we can > attach a specialised unit with a display and keyboard to it. We must use > minimum number of pins for it (one), and it should be possible to implement > "everywhere". > > The monitor unit I believe can be built using a F84, LCD and a few keys to > select adress and view and change registers, force gotos or calls to > stop,test,run routines etc in the target system. > > The target system4s routine shoud of course be as possible as possible, and > perform som kind of erroer check so it don4t treat noise as instructions. > > The monitor scans the keys, decode it to simple instructions and send them > to the target. The target sends back register contents binary, which the > monitor decodes and displays. > > /Morgan O > > Morgan Olsson, MORGANS REGLERTEKNIK, Sweden, ph: +46 (0)414 70741; fax 70331 > -