home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.handhelds
- 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
- From: luigi@pical2.uucp (Luigi Rizzo)
- Subject: Re: CASIO Diary port
- Message-ID: <1992Nov13.081118.12772@di.unipi.it>
- Sender: luigi@iet.unipi.it
- Nntp-Posting-Host: pical2.iet.unipi.it
- Reply-To: luigi@iet.unipi.it
- Organization: Dip. di Ingegneria dell'Informazione, Univ. di Pisa (ITALY)
- References: <9231713.20800@mulga.cs.mu.OZ.AU>
- Date: Fri, 13 Nov 1992 08:11:18 GMT
- Lines: 156
-
- In article <9231713.20800@mulga.cs.mu.OZ.AU> bhat@mullauna.cs.mu.OZ.AU (Timothy Alan Heath BELL) writes:
- >Does anyone use a CASIO Digital diary and know what the port is? I know
- >that I can spend AUS$200 and get an interface, but I should be able to make
- >a connector. Has anyone got any experience or ideas about this?
- >The model is SF-4300, bought in 92, and the port appears to be about 2.5mm
- >across, like the rare mini (not 3.5mm) headphone socket.
- >
-
- I have one of those, have built the interface for it and written some
- software (on Unix at the moment) to communicate with the unit. Here is
- some documentation on what I have found so far. Stay tuned for more
- news...
-
- Cheers
- Luigi Rizzo
-
- ======================================================================
- Documentation Casio SF-4300 (and other Casio models with the 2.5mm
- jack)
-
- The serial port is a basic RS232 with TTL levels and no handshake. The
- connector on the handheld is a 2.5mm stereo jack with the following
- connections (referred to the casio):
-
- __ ____ ________|
- <__ ____ ________
- | | |
- 1|out 2|in 3|gnd
-
-
- The levels are +4v (idle), 0v (active) and are inverted with respect to
- a standard RS232. A possible transceiver as we implemented it might be:
-
- ^Vcc
- |
- 15K < |
- < |
- < /
- Casio 10K D | |<E
- 1 -----VVVVV-----|<|----+--| BC558 (PNP)
- |\
- \-------- RS232 - 3 (in)
- |
- <
- <
- <
- |
- V -Vcc
-
-
- /-------- Casio - 2 (in)
- RS232 4.7K |/
- 2(out) ----VVVVVV---+---+----| BC548 (NPN)
- | | |\
- < -- \>
- < /\ |
- < -- |
- | | |
- RS232 -------------+---+------+------- Casio - 3 (gnd)
- 7(gnd) |
- |
-
- Basically, it's simply a level translator and inverter. The diodes can
- be any model (like 1n914, 1n4148 etc), similarly any low power
- transistor should work. To avoid complications, the power is derived
- through a resistive splitter. Output levels are around +/- 4 V, and the
- RS232 interface on the PC works fine with them.
-
-
- To generate the power supply, you can either use a single 9v battery,
- with the circuit below, or you can build a DC-to-DC converter in order
- to use the DTR pin as the power supply (+Vcc) and produce -Vcc. I did
- this using a 4093 (CMOS) quad NAND w/schmitt trigger and a few spare
- parts.
-
- GND
- ^ ^ ^
- | +Vcc | | -Vcc
- | 470 | 470 |
- +-------VVVVV-----+-----VVVVV----+
- | | |
- | | |10uF | 10uF| | |
- +-------| |-------+------| |-----+
- | | | | | |
- | |
- | | |
- | | || |
- +------------| ||----------------+
- | || 9V
- |
-
- SOFTWARE ASPECTS
-
- More information will come by reading the C source -- I hope to complete
- it in a few weekends. These informations are for those who want to play
- with the unit using, say, kermit or some other terminal emulator to
- understand the record format.
-
- 1. Records
-
- Communication is based on generic records having the following
- structure:
-
- : LEN FLAGS DATA CHECKSUM
-
- The column starts the record. The following fields are all in HEX
- format.
-
- LEN: 1 byte, size of data fields.
- FLAGS: 3 bytes, not completely decoded at the moment.
- DATA: LEN bytes
- CHECKSUM: 1 byte, 2's complent of the sum modulo 256 of all the previous
- data (excluding the column). The sum of all hex data must be 0
-
- 2. Special character
-
- In addition to hex characters, ASCII characters are sent on the line.
- Some of them have special meaning, as:
-
- : beginning of record
- ! stop Casio
- " force an error
- # ACK
- ? NACK, repeat previous data
- CRLF send by the casio at the beginning of a transaction
- 1 expected by the Casio before sending data
-
-
- 3. Flags meaning
-
- Flags can be seen as having the following structure:
-
- byte: H L T
-
- 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
-
- T indicates the record type:
- 00 data
- 01 end of record
- 02 beginning of transaction (?)
- FF end of transaction
-
- During data transfers, h7 is 1 and 0 otherwise.
-
- H L specifies the offset of a record inside a block of data. But
- sometimes might have other meanings.
-
- ==============================================================
-
-
- ====================================================================
- Luigi Rizzo Dip. di Ingegneria dell'Informazione
- email: luigi@iet.unipi.it Universita' di Pisa
- tel: +39-50-568533 via Diotisalvi 2, 56124 PISA (Italy)
- fax: +39-50-568522
- ====================================================================
-