On Mon, 8 Dec 1997, Andy Kunz wrote: > >You are very lucky. If two pins other than power or ground make contact > You can operate a PIC by providing power through I/O pins. And if you make > your program smart enough, you can even do better. Consider, for example, > the following: [ Code to sense power polarity and turn the inputs into outputs deleted.] It isn't necessary to make the power pins outputs. If you don't, I think all that will happen, is Vdd and Vss will be a couple diode drops closer together. This is a bad thing if the absolute values of Vdd and Vss matter, but not bad for all applications. In particular, if the power pins are left as inputs, then you can send data with the power. Just the thing for those simple 2 wire circuits. However, I want to try zero wires and use inductive coupling for power and data. I've been planning on making my own PIC based, inductively powered smart cards since I read the spec sheet for the 12C509. I just need a purpose for such a thing. The thread did inspire me to do some experiments. It looks like a complete card only needs a capacitor or two, a PIC, a zener diode and a printed circuit board. If it isn't based on a 12Cxxx part, it will also need the oscillator parts. So far, I've only tested the power supply part of the system. The PIC blinked an LED to prove that it was alive. I haven't tried to move data from my smart card to the host system. For a real smart card, I would etch a coil around the edge of a card sized printed circuit board. I guess I could get 10 or 20 turns on the coil. I simulated that by wrapping 20 turns of wire around a roll of masking tape. I hooked the coil to a couple of PORT B pins on a PIC 16F84. I put a 1000 microfarad capacitor and a 5.1volt zener diode across power and ground. I used a 10Mhz ceramic resonator. To prove that it worked, I added an LED with a current limiting resistor. I happened to have another PIC on a breadboard conviently hooked up to a motor driver chip. I reprogrammed that PIC to act as a 100Khz oscillator for 250 cycles, then pause for 1 millisecond then repeat. I connected a coil with 10 turns of wire wrapped around another roll of masking tape to the motor driver through a .1 microfarad capacitor. Once the coils were within about a centimeter of each other, my oscilliscope showed 5 volts. I added a 1Kohm resistor load to the circuit. The 1Kohm resistor draws 5 milliamps at 5 volts. 5 milliamps is plenty of power for a PIC. The 1000 microfarad capacitor is way too big for this circuit, but there was one handy on my bench. My web pages got a lot of hits when they made the top 5 useless websites of 1995. I guess I specialize in useless. If I can think of a plausible use for the cards, I'll make a few. All the vaguely usefull things involve some nonvolatile memory, so I'd need to use a 16F84 or an external EEPROM. Assuming I use a 16F84, the card would be a printed circuit board, with a PIC, a resonator, 2 capacitors and a zener diode. Certainly less than $10 each. Using an external EEPROM would make it much cheaper. The reader would be somewhat more complex, but still less than $20. So, anyone got suggestions for usefull things to do with homemade smart cards? -- paulh@hamjudo.com http://www.hamjudo.com The April 97 WebSight magazine describes me as "(presumably) normal".