 2.2 - Pinout:
         ~~~~~~
----------------------------------------
  Idea:          10 Feb 1998 by KYV
  Created:       22 Apr 1999 by SBlackChip
  Remake:        09 Sep 1999 by SBlackChip
  E-Mail:                blackchip@mail.ru
  ----------------------------------------

    ******** PinOut ********

           ISO 7816-2
 ,-------------+-------------,
 |   1         |         5   |       Pinout:
 +-------\     |     /-------+       ~~~~~~
 |   2    +----+    +    6   |     1 : VCC=5V    5 : Gnd
 +--------|         |--------+     2 : Reset     6 : n.c.
 |   3    +----+----+    7   |     3 : Clock     7 : I/O
 +-------/     |     \-------+     4 : n.c.      8 : n.c.
 |   4         |         8   |
 '-------------+-------------'     (n.c. : not connected)

                      LPT:              Phone Card
  Clk   -  data 0      2  <------------------->  3
  Reset -  data 1      3  <------------------->  2
  I/O   -  SLCTD      13  <------------------->  7
  Gnd   -  Gnd        25  <------------------->  5  

   2.3 - Main features:
         ~~~~~~~~~~~~~

        - ISO 7816- 1/2 compatible.
        - use a single 5V power supply.
        - low power consuption.
        - NMOS technology.

   2.4 - Time Diagrams:
         ~~~~~~~~~~~~~

Reset:
------
  The address counter is reset to 0 when the clock line CLK is raised while
the control line R is high. Note that the address counter can not be reset
when it is in the range 0 to 7.

      __________________
_____|                  |_____________________________________________ Reset
     :                  :
     :        _____     :  _____       _____       _____       _____
_____:_______|     |____:_|     |_____|     |_____|     |_____|     |_ Clk
     :       :          : :     :     :     :     :     :     :     :
_____:_______:__________:_:_____:_____:_____:_____:_____:_____:_____:_
_____:___n___|_____0____:_|_____1_____|_____2_____|_____3_____|___4_:_(Address)
     :                  :       :           :           :           :
_____:                  :_______:___________:___________:___________:_
_____XXXXXXXXXXXXXXXXXXXX_______|___________|___________|___________|_ Data
Bit n                      Bit 0    Bit 1        Bit2       Bit3

   The address counter is incremented by 1 with each rising edge of the clock
signal Clk, for as long as the control line R remains low. The data held in
each addressed bit is output to I/O contact each time Clk falls. It is not
impossible to decrement the address counter, therefore to address an earlier
bit, the address counter must be reset then incremented to require value.


Write:
------
   All unwritten or erased bits in the address 64-104 may be unwritten to.
When a memory cell is unwritten, it is set to 0. The addressed cell is
unwritten to by the following sequence.

1- R is raised while Clk is low, to disable address counter increment for one
clock pulse.

2- Clk is then raised for a minimum of 10ms to write to the address bit.

When to write operation ends, and Clk falls, the address counter is unlocked,
and the content of the written cell, which is now 0, is output to I/O contact
if the operation is correct.
The next Clk pulse will increment the address by one, then the write sequence
can be repeated to write the next bit.

              _____                                _____
_____________|     |______________________________|     |_______________  Reset
             :                                    :
     ___     :           _____           ___      :           _____
____|   |____:__________|     |_________|   |_____:__________|     |____  Clk
    :        :          :     :         :   :     :          :     :
____:________:__________:_____:_________:___:_____:__________:_____:_____
 n  |      n+1          |     n+2       |   :    n+3         |     :  (Address)
----'--------:----------'-----:---------'---:-----:----------'-----:-----
             :          :     :             :     :          :     :
_________   _:          :     : ____________:  ___:          :     :
_________XXX_XXXXXXXXXXXXXXXXXXX____________ XX___XXXXXXXXXXXXXXXXXXXXXXX  I/O
   n      n+1           :     :     n+1        n+2           :     :
                        :     :                              :     :
                         write                                write


WriteCarry:
-----------

   A counter is erased by performing the WRITECARRY sequence on the stage of
the next highest weighing to that to be erased.

The writecarry sequence is as follows:

1 - Set the address counter to an unwritten bit in the next highest counter
stage to that to be erased.

2 - Increment is disabled on the following rising edge of R where Clk remains
low.

3 - Clk is then raised for a minimum of 10ms, while R is low, to write to the
next address bit.

4 - R is the raised again while Clk remains low to disable increment a second
time.

5 - Clk is the raised for a minimum of 1ms, while R is low, to write to the
addressed bit a second time, erasing the counter level immediately below that
the addressed bit.

       _____                      _____
______|     |____________________|     |_________________________________  Rst
      :                          :
      :            _______       :              _______        ___
______:___________|       |______:_____________|       |______|   |______  Clk
      :           :       :      :             :       :      :   :
      :           :       :      :             :       :      :   :
<------------------------- address n ------------------------>:<--- n+1 ------
      :           :       :      :             :       :          :
      :           :       :      :             :       :          :
______:           :       :______:             :       :__________: _____
______XXXXXXXXXXXXXXXXXXXXX______XXXXXXXXXXXXXXXXXXXXXXX__________XX_____  I/O
                  :       :  n                 :       :     n        n+1
                  :       :                    :       :
                    Write                        Erase

   

                        p :                          
           --------T---------T--------------------------------    
                                             
           --------+---------+--------------------------------    
              1-3   1-24      W/P EPROM: Manufacturer           
               4-8   25-64     W/P EPROM: Issuer area        
               9-13  64-104    EEPROM: 5-digit octal counter 
              14-16  105-128   Unused: Set to "1"            
            L--------+---------+---------------------------------
                                                                    
             5-pp         
             p 64..104 ( 9-13).   -
             , pp,  p:
                                                                 
             -------------------------------------------------- 
                 9         10        11        12        13    
             --------------------------------------------------
              00000001  00011111  01111111  00000011  00011111 
                 1          5        7          2         5       
               1*8^4  +   5*8^3 +  7*8^2  +   2*8^1 +   5*8^0  
               4096   +   2560  +  448    +   16    +   5=7125 
            L---------------------------------------------------    
                                                                    
             ,      -     
             , ,    p -     
             .                                          
       

E-Mail: blackchip@mail.ru


Exemple of the WRITE and WRITECARRY sequences:
---------------------------------------------

        b65 ........................................... b104
        ----------------------------------------------------
        00000111 - 00111111 - 01111111 - 00000000 - 00000011
-1                                                        ^    WRITE(b103)
        00000111 - 00111111 - 01111111 - 00000000 - 00000001
-1                                                         ^   WRITE(b104)
        00000111 - 00111111 - 01111111 - 00000000 - 00000000
-1                             ^         ^          ^
        00000111 - 00111111 - 00111111 - 11111111 - 00000000 + WRITECARRY(b82)
        00000111 - 00111111 - 00111111 - 01111111 - 11111111 + WRITECARRY(b89)
        00000111 - 00111111 - 00111111 - 01111111 - 01111111 + WRITE(b97)
-1
        00000111 - 00111111 - 00111111 - 01111111 - 00111111 + WRITE(b98)
-1
        00000111 - 00111111 - 00111111 - 01111111 - 00011111 + WRITE(b99)

        Etc ....


E-Mail: blackchip@mail.ru
http://www.fortunecity.com/skyscraper/pointone/293/