DC25-Protokoll
-----------------------------------------------------------------------
This is the first Version of documentation of the DC25 serial interface.
Possible many mistakes and wrong informations follow.
All informations were taken by analyzing the voltage signal on the RS232.
Please send comments and experiences back to me.
have fun! Joerg.Schulenburg@physik.(NO)uni-magdeburg.(SPAM)de
1. serial protokoll of DC25 camera
1.1 generals
1.1.1 ...
serial mode: 8 bits, even parity, 1 stopbit (9600 bps)
bps rates: 9600, 19200, 38400, 57600, 115200
PC: sends eight-byte-commands or a 0xD2 to request the next data
DC25: sends byte 0xD1 as command acceptet
or byte 0xE1 as time out error
or byte 0xE2 as unknown command error
or data where the last byte is a XOR checksum
the first byte 00
1.1.2 notation
o: here can you read the outgoing bytes (PC -> camera)
i: here can you read the incomming bytes (camera -> PC)
#n: stands for the (n+1)-th byte of record (offset, n=decimal)
1.2 commands
all numbers are given in hexadezimal notation (without 0x)
- set transfer rate 9600 bps
o: 41 00 96 00 00 00 00 1a
i: d1 (should be, otherwise error?)
- set transfer rate 19200 bps
o: 41 00 19 20 00 00 00 1a
i: d1
...
- set transfer rate 115200 bps
o: 41 00 11 52 00 00 00 1a (strange! #2.. bps in BCD-code)
i: d1
- get status
o: 7f 00 00 00 00 00 00 1a
i: d1
i: (256 data bytes + 1 check byte)
-> #0 = 01
#1 = 25
#9 = flash 0=auto 1=on 2=off
#11 = resolution 0=high 1=low
#17 = number of high resolution pictures taken
#21 = memory free for high resolution pictures
#23 = memory free for low resolution pictures
- set new resolution
o: 71 00 00 00 00 00 00 1a -> #2 = resolution 0=high 1=low
i: d1
i: 00 -> ready
- set flash mode
o: 72 00 02 00 00 00 00 1a -> #2 = flash 0=auto 1=on 2=off
i: d1
i: 00 -> ready
- take a picture
o: 77 00 00 00 00 00 00 1a
i: d1
i: 00 -> ready
- erase all pictures
o: 7a 00 00 00 00 00 00 1a
i: d1 -> (Busy lamp on camera goes on)
i: 00 -> ready (Busy lamp on camera goes dark)
- ???
o: 7e 00 00 00 00 00 00 1a
i: d1
i: 00 -> ready
- ??? get picture infos
o: 55 00 00 01 00 00 00 1a -> #3 = number of picture
i: d1
i: (256 data bytes + 1 check byte) -> #0 = 01
o: d2 -> get next datablock #1 = 25 DC25
i: 00 -> no block left #9 = 01 e8 numX (00 f4)
#13= 01 00 Blitz
00 02 no Blitz
#16= 01 fa numY
#34= 01 06(08 Blitz) af ba c8 a4 6b
#44= RGB=120 (4Bytes) intensity
#48= RGB=112 (4Bytes) intensity
#52= RGB=211 (4Bytes) intensity
#56= RGB=021 (4Bytes) intensity
#60= 00 00 12 c0 00 01 00 00 o.a.
#68= 00 01 00 00 o.a.
#72= 00 01 b3 33 o.a.
#76= 00 00 02 44 picture number
#80= 45 ff ff ..
- read thumb nail ? (15 blocks a 1024+1 byte)=(80*60*3=14400)
o: 56 00 00 01 00 00 00 1a -> #3 = number of picture
i: d1
...
i: (1024 data bytes + 1 check byte) -> #0 = 0=last block
o: d2 -> get next datablock
...
i: 00 -> no block left
- read picture (120 (?) blocks a 1024+1 byte)
o: 51 00 00 01 00 00 00 1a -> #3 = number of picture
i: d1
i: (1024 data bytes + 1 check byte) -> #0 = 01 see 55 .. picture infos
...
o: d2 -> get next datablock
i: (1024 data bytes + 1 check byte) -> #0 = ff
...
o: d2 -> get next datablock
i: 00 -> no block left
------------------------------------------------------------------------
2. file format DC0001h.K25
2.1 "high resolution"
file length = 140352 = 022440h
# offset contains (hex)
+0000 'MM' 00 2A
+0009 28=high 1C=low
+000C thumbnail - offset
+001E thumbnail - width 00 50 = 80d
+002A thumbnail - high 00 3c = 60d
+00AE picture offset 3C 40
+0133 10=high 1F=low
+013F picture number (hex)
+0164 name 'DC0001H@' 'H'=high 'S'=small
+016E 'Eastman Kodak Company\0'
'KODAK DC25 DIGITAL CAMERA\0'
+01AE 'DC25 Camera V1.0\0'
+01c0 date1 '0000:00:00 00:00:00'
+01f7 28=high 00=low
+01fe date2 '0000:00:00 00:00:00'
+0226 01 ED = high, 01 40 = low
+0232 01 75 = high, 00 f0 = low
+0264 picture offset 3C 40
+0286 01 75 = high, 00 f0 = low
+0294 file length 00 02 24 00 = high, 00 00 F4 00 = low
-----------------------------------
+0400 thumbnail RGB camera function 56
( 80 * 60 * 3 = 14400 ) + 960 {FF} = 15360 (dez)
( 50 * 3C * 3 = 3840 ) + 3C0 {FF} = 3C00 (hex)
-----------------------------------
+3C40 CCD - data header, camera function 55 or 51 = 0200 bytes ...
01 25 ...
+3C6C CMYG intensities RGB=120 112 211 021
+3C8C 00 00 02 0E absolute picture number
+3E40 CCD data camera function 51
243 lines * 512 bytes (1st & last 10 bytes = FF) = 01E600 bytes (hex)
0F3 lines * 0200 bytes = 124416 bytes (dez)
last line FF
-----------------------------------------------------------------------------