home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / handheld / 2401 < prev    next >
Encoding:
Text File  |  1992-11-13  |  5.5 KB  |  170 lines

  1. Newsgroups: comp.sys.handhelds
  2. Path: sparky!uunet!news.centerline.com!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!uwm.edu!caen!batcomputer!ghost.dsi.unimi.it!newsserver.di.unipi.it!pical2!luigi
  3. From: luigi@pical2.uucp (Luigi Rizzo)
  4. Subject: Re: CASIO Diary port
  5. Message-ID: <1992Nov13.081118.12772@di.unipi.it>
  6. Sender: luigi@iet.unipi.it
  7. Nntp-Posting-Host: pical2.iet.unipi.it
  8. Reply-To: luigi@iet.unipi.it
  9. Organization: Dip. di Ingegneria dell'Informazione, Univ. di Pisa (ITALY)
  10. References: <9231713.20800@mulga.cs.mu.OZ.AU>
  11. Date: Fri, 13 Nov 1992 08:11:18 GMT
  12. Lines: 156
  13.  
  14. In article <9231713.20800@mulga.cs.mu.OZ.AU> bhat@mullauna.cs.mu.OZ.AU (Timothy Alan Heath BELL) writes:
  15. >Does anyone use a CASIO Digital diary and know what the port is? I know
  16. >that I can spend AUS$200 and get an interface, but I should be able to make
  17. >a connector. Has anyone got any experience or ideas about this?
  18. >The model is SF-4300, bought in 92, and the port appears to be about 2.5mm
  19. >across, like the rare mini (not 3.5mm) headphone socket.
  20. >
  21.  
  22. I have one of those, have built the interface for it and written some
  23. software (on Unix at the moment) to communicate with the unit. Here is
  24. some documentation on what I have found so far. Stay tuned for more
  25. news...
  26.  
  27.     Cheers
  28.     Luigi Rizzo
  29.  
  30. ======================================================================
  31. Documentation Casio SF-4300 (and other Casio models with the 2.5mm
  32. jack)
  33.  
  34. The serial port is a basic RS232 with TTL levels and no handshake. The
  35. connector on the handheld is a 2.5mm stereo jack with the following
  36. connections (referred to the casio):
  37.  
  38.           __  ____ ________|
  39.          <__  ____ ________
  40.            |     |         |
  41.           1|out 2|in      3|gnd
  42.  
  43.  
  44. The levels are +4v (idle), 0v (active) and are inverted with respect to
  45. a standard RS232. A possible transceiver as we implemented it might be:
  46.  
  47.                           ^Vcc
  48.                           |
  49.                      15K  <    |
  50.                           <    |
  51.                           <    /
  52.  Casio    10K       D     |  |<E
  53.   1 -----VVVVV-----|<|----+--|  BC558 (PNP)
  54.                  |\
  55.                                \-------- RS232 - 3 (in)
  56.                    |
  57.                    <
  58.                    <
  59.                    <
  60.                    |
  61.                    V  -Vcc
  62.  
  63.  
  64.                                  /-------- Casio - 2 (in)
  65.   RS232       4.7K             |/
  66.   2(out) ----VVVVVV---+---+----|  BC548 (NPN)
  67.                       |   |    |\
  68.               <   --     \>
  69.               <   /\     |
  70.               <   --     |
  71.               |   |      |
  72.   RS232  -------------+---+------+-------  Casio - 3 (gnd)
  73.   7(gnd)              |
  74.                       |
  75.  
  76. Basically, it's simply a level translator and inverter. The diodes can
  77. be any model (like 1n914, 1n4148 etc), similarly any low power
  78. transistor should work. To avoid complications, the power is derived
  79. through a resistive splitter. Output levels are around +/- 4 V, and the
  80. RS232 interface on the PC works fine with them.
  81.  
  82.  
  83. To generate the power supply, you can either use a single 9v battery,
  84. with the circuit below, or you can build a DC-to-DC converter in order
  85. to use the DTR pin as the power supply (+Vcc) and produce -Vcc. I did
  86. this using a 4093 (CMOS) quad NAND w/schmitt trigger and a few spare
  87. parts.
  88.  
  89.                      GND
  90.     ^                 ^              ^
  91.     | +Vcc            |              | -Vcc
  92.     |       470       |     470      |
  93.     +-------VVVVV-----+-----VVVVV----+ 
  94.     |                 |              |
  95.     |       | |10uF   |  10uF| |     |
  96.     +-------| |-------+------| |-----+
  97.     |       | |              | |     |
  98.     |                                |
  99.     |            |                   |
  100.     |            | ||                |
  101.     +------------| ||----------------+
  102.                  | ||  9V
  103.                  |
  104.  
  105. SOFTWARE ASPECTS
  106.  
  107. More information will come by reading the C source -- I hope to complete
  108. it in a few weekends. These informations are for those who want to play
  109. with the unit using, say, kermit or some other terminal emulator to
  110. understand the record format.
  111.  
  112. 1. Records
  113.  
  114. Communication is based on generic records having the following
  115. structure:
  116.  
  117. : LEN FLAGS DATA CHECKSUM
  118.  
  119. The column starts the record. The following fields are all in HEX
  120. format.
  121.  
  122. LEN: 1 byte, size of data fields.
  123. FLAGS: 3 bytes, not completely decoded at the moment.
  124. DATA: LEN bytes
  125. CHECKSUM: 1 byte, 2's complent of the sum modulo 256 of all the previous
  126.     data (excluding the column). The sum of all hex data must be 0
  127.  
  128. 2. Special character
  129.  
  130. In addition to hex characters, ASCII characters are sent on the line.
  131. Some of them have special meaning, as:
  132.  
  133. :    beginning of record
  134. !    stop Casio
  135. "    force an error
  136. #    ACK
  137. ?    NACK, repeat previous data
  138. CRLF    send by the casio at the beginning of a transaction
  139. 1    expected by the Casio before sending data
  140.  
  141.  
  142. 3. Flags meaning
  143.  
  144. Flags can be seen as having the following structure:
  145.  
  146. byte: H L T
  147.  
  148. bit: h7 h6 h5 h4 h3 h2 h1 h0 l7 l6 l5 l4 l3 l2 l1 l0 t7 t6 t5 t4 t3 t2 t1 t0
  149.  
  150. T indicates the record type:
  151. 00    data
  152. 01    end of record
  153. 02    beginning of transaction (?)
  154. FF    end of transaction
  155.  
  156. During data transfers, h7 is 1 and 0 otherwise.
  157.  
  158. H L specifies the offset of a record inside a block of data. But
  159. sometimes might have other meanings.
  160.  
  161. ==============================================================
  162.  
  163.  
  164. ====================================================================
  165. Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
  166. email: luigi@iet.unipi.it       Universita' di Pisa
  167. tel: +39-50-568533              via Diotisalvi 2, 56124 PISA (Italy)
  168. fax: +39-50-568522
  169. ====================================================================
  170.