The principle of telephone cards

There are two main types of chip phone cards: 8 contact and 6 contact. Usually, 5 contacts are used in 6 contact cards, there are also instances of 8 contact cards, which also use only 5 contacts, the rest in load. The cards contain an electrically programmable ROM with a capacity of 256 * 1 bit with sequential bit-by-bit information output and an internal incremental address counter. The operation of recording changes the state of the memory cells "one way", the reverse change (erasure) by the interface of the card is not provided. The connection of cards to the computer for reading and writing is mainly done via the LPT port. Unfortunately, many cards can not be re-recorded because after the first recording the fuse is fired. You need to collect a phone card emulator.

The order of the actions performed by the cartoon when calling.

  1. Turning the power on.

  2. Reset.

  3. Reading the first 8 bytes and determining whether the card is valid in this region, storing them in RAM (if necessary with decoding).

  4. Read five bytes of units and save to RAM. Verify that the available capacity units of the card are coded in the first 8 bytes.

  5. Power off.

After receiving the answer signal of the called subscriber:

  1. Turning the power on.

  2. Calculation of the address of the last non-decommissioned bit. (Approximately in 1-3 seconds after pressing the "answer" key)

  3. Reset.

  4. Supply of imp. CLK to the corresponding address of the last non-decommissioned bit.

  5. Submission of the WRITE command.

  6. Submission of command W \ C.

  7. Reading the first 8 bytes and determining whether the card is valid in this region, storing them in RAM (if necessary with decoding).

  8. Read five bytes of units and save to RAM. Verification of the correspondence of the available units of card capacity encoded in the first 8 bytes, checking whether the units have decreased in comparison with the previous reading.

Power off.

At the end of a minute, if the connection is not broken, then the actions from the first to the ninth are repeated cyclically.