This is a quick conversion of the interesting (to driver developers) bits of the Artec documentation. Spelling mistakes are theirs!

Artec Private Wake-up Sequence

The system has one sequence to wake-up by the software from passthrough mode, describe as follows.

D7-D4:         6              C           F            2           1
D3
    
Using rising-edge of D3 to sense the nibble data(formed by D7-D4), if the sequence is 6CF21 then the system will go into scanner mode. If any nibble data is wrong then the "Checker" will go back to idle mode to re-trace this sequence. The 4 control lines(nInit, nStrobe, nSelectIn, nAutoFd) should always be in "HIGH" state for correct wake-up sequence or the "Checker" will be reset to idle mode. Go back to passthrough mode will need software to program one bit.

Register Description

This section will describe the register detailly, also in the next section, how to program this engine will be described.

Name Port Adr R/W VHDL Name Description Default

Protocal Setting Register

Protocal Configuration Register 01H R/W enscan passt nibble byte epp ecp init_tst_mode tst_mode
Bit(7)0disable Scan
 1Enable Scan
Bit(6)0disable passthrough
 1enable passthrough
Bit(5,4)(0,0)Nibble Mode
  (0,1)Byte Mode
  (1,0)EPP Mode
  (1,1)ECP Mode
Bit(3) ASIC test only
Bit(2) ASIC test only
Bit(1,0) Not used, should program with (0)
00H

Status Control Register

Sensor Register 02H R paper_in paper_in_line mt_home autoscan Sheet_Sensor_0/1 flat_nsheet I've removed the stuff for sheet fed scanners
All this bits reflect the real state of sensor, which should be carefully debounce-free designed in hardware.
	  Flat-Bed Scanner: 
Bit(5) -> Motor Position Sensor 
          0 == Motor leave end position 
          1 == Motor reach end position
	  
When autoscan button is pressed this bit will be latch to 1.
Bit(4) -> "AutoScan  Button" on top
          1 == Button Pressed
          0 == Button Released

Bit(0) -> 0 == Sheet-Fed Scanner
          1 == Flat-Bed Scanner 
	  
00H
Configure Setting Register 03H R/W rst_ascan tst_sram mt_tst_go mt_stop mt_align en_wdg_timer sel_cisclk
Bit(7) -> Acknowledge the PC is received autoscan
         0 == PC not received autoscan
         1 == autoscan is ready 

Bit(6) -> Test  SRAM          
          0 == disable test SRAM
          1 == enable test SRAM 

Bit(5) -> Motor Control by  S/W
          0 = Motor Disabled
          1 = Motor Enabled 

Bit(4) -> Motor Enable in Any Mode
          0 == Motor Enabeld
          1 == Turn off Motor under any condition 

Bit(3) -> Motor moving forward or backward
          0 == Motor Forward
          1 == Motor Backward
When this next bit is selected the watch-dog-timer will enable. The system will halt when host not read or write Scanner.
Bit(2) -> 0 == No watch-dog-timer
          1 == enable watch-dog-timer

Bit(0) ->Cisclk  2
          0 == Cisclk no change
          1 == Cisclk  2 

Bit(1)   -> Not used, should program with (0)
	  
00H

LineControl Register

Scan Mode Register 04H R/W dpi50 dpi100 dpi200 dpi300 gray color truegray pxlave lineart dpi600
Bit(7,6) -> Resolution
            (0,0) == 50DPI
            (0,1) == 100DPI
            (1,0) == 200DPI
            (1,1) == 300DPI

Bit(5,4) -> Output Data Mode
          (0,0) == Not used
          (0,1) == Gray, 8bit/pixel
          (1,0) == Color, 24bit/pixel
          (1,1) == truegray  

Bit(3) -> Pixel Average Mode enable
          0 == Disabled
          1 == Enabled  

Bit(2) -> Output Data Mode
          0 == Disabled
          1 == Enabled

Bit(1) -> Resolution
          0 == Disabled
          1 == Enabled 

Bit(0) -> Not used, should program with (0)
	  
00H
Line Time Register 05H Low 06H High R/W linetime(15..0) Line Time Register decide how many pixel clocks are there for one scan line . Unit = 8 * system clk 00H
Start Number of Image Pixel Register 07H Low 08H High R/W pxlbegin(11..0) Start Pixel Register decide the most left side of pixel number which software want to get in the image width. Unit = Pixel Number 00H
Stop Number of Image Pixel Register 09H Low 0AH High R/W pxlend(11..0) top Pixel Register decide the most right side of pixel number which software want to get in the image width. Unit = Pixel Number 00H
Threshold Register 0BH R/W threshold_u(7..0) Threshold for Line-Art Mode upper level. 00H
Threshold Register 2AH R/W threshold_d(7..0) Threshold for Line-Art Mode down level. 00H

Motor Control Register

The Empty of image line Register 0CH Low 0DH High R/W empty_step(11..0) Write to this register will decide how many steps should the engine go empty without receive data. (0CH,0BH) = 64k steps Unit = Steps 00H
SoftWare Motor Steps High Byte Register 0EH Low 0FH High R/W mt_step(11..0) Write to this register will decide how many steps should the engine go when the motor is under control of software if not stop by sensor. Read from this register will tell how many steps still left to go from last write if stop by sensor or motor disable by software.(for non scan mode) (0CH,0BH) = 64k steps Unit = Steps 00H
SoftWare Motor Speed High Byte Register 10H Low 11H High R/W mt_speed(15..0) This Register decide the speed of motor rotate when in SoftWare Control. Actually the value is the period of one step. Unit = system clk 50H(L) C3H(H)

CIS LEDControl Register

CIS LED Control Register 12H R/W swledon rledon gledon bledon
Bit(7) -> LED On/Off Control By S/W
        0 == LED not control by HardWare
        1 == LED control by SoftWare  

Bit(6) -> Red LED On
        0 == Turn Off Red LED
        1 == Turn On Red LED 

Bit(5) -> Green LED On
        0 == Turn Off Green LED
        1 == Turn On Green LED 

Bit(4) -> Blue LED On
        0 == Turn Off Blue LED
        1 == Turn On Blue LED 

Bit(3,2,1,0) -> Meaningless
	  
00H
Red LED On Byte Register 13H Low 14H High R/W exp_r (15..0) This Register decide the Red LED On time for one scan line Unit = 8 * system clk 00H
Green LED On Time Register 15H Low 16H High R/W exp_g (15..0) This Register decide the Green LED On time for one scan line Unit = Pixels Clock 00H
Blue LED On Byte Register 17H Low 18H High R/W exp_b (15..0) This Register decide the Blue LED On time for one scan line Unit = 8 * system clk 00H
SRAM Control Register Maximum Scan Line In Buffer 19H R/W maxline(7..0) This register decide the maximum scan line for the system to store before stop scanning. Unit = line 00H
Number of Bytes for one scan line 1CH Low 1DH High R/W oneline(12..0) This register decide how many bytes stored in SRAM of one line. (Oneline = actual value - 1) Unit = Bytes 00H
Image Buffer Test Data Register 1EH   pc_databus_wr (7..0) This register use in testing SRAM only. When the PC is write data to SRAM , data will stored in this register. 00H
Image Buffer Test Address Register 1FH Low 21H High R/W pc_addrbus(15..0) This register use in testing SRAM only. This register will tell what address the SRAM been pointed. 00H
Image Buffer Line Count Registert 22H Low R/W sram_line(7..0) This register indicate how many lines in SRAM.  
Motor Hold time Registert 25H Low R/W mt_hold(7..0) This register indicate how many time the motor will moving. Unit = 1.67ms . Maximum times=427.8ms  
Motor Back Registert 26H   mt_back(7..0) This register indicate how many step the motor will be back. Unit =16 steps . Maximum steps=4080 steps. 80H
CIS Timing Mask Register 27H R/W darkhead(7..0) This register indicate how many pixel will be ignore before turn on led light source. Unit =pixel . Maximum pixels=255 pixels. 00H
Motor Head Register 28H   mf_step(7..0) Sheet-Fed Scanner: When Scanner is in the sheet-fed mode , select two sensor ,and paper_in= 1, scanner will go ahead until paper_in_line=1. The register decide how many steps the motor move. Unit = 16 steps. Default = 4080 steps. 80H
Motor Tail Register 29H   mw_step(7..0) Sheet-Fed Scanner: When the scanner is end of scanning the motor will be retire paper . The register decide how many steps the motor move. Unit = 16 step. Default = 4080 steps. 00H
Watch Dog Timer Register 2BH   watch_dog_timer (7..0) This register indicate how many time the scanner is stop walk after PC not r/w scanner. Unit = 1.6s Maximum = 408s 02H
Sensor Register 2CH R Paper_jam touch2 touch1 touch0 rst_paper_jam rst_touch2 rst_touch1 rst_touch0 When paper is jaggle this bit will be latch to 1. Sheet-Fed Scanner:
Bit(7) -> paper jam or not
         0 == Paper OK
         1 == Paper Jam
This bits reflect the real state of sensor, which should be carefully debounce-free designed in hardware.
  Bit(6) ->Reserved
         0 == Sensor Empty
         1 == Sensor In
This bits reflect the real state of sensor, which should be carefully debounce-free designed in hardware.
Bit(5) -> Reserved
         0 == Sensor Empty
         1 == Sensor In
This bits reflect the real state of sensor, which should be carefully debounce-free designed in hardware.
Bit(4) -> Reserved
         0 == Sensor Empty
         1 == Sensor In
Sheet-Fed Scanner: When this bit is set to 1 the signal paper_jam will set to 0.
Bit(3) -> Reset paper_jam signal
         0 == status unchange
         1 == reset paper_jam

 Reset touch2 Sensor
         0 == Sensor no change
         1 == Reset Sensor

 Reset touch1 Sensor
         0 == Sensor no change
         1 == Reset Sensor

 Reset touch0 Sensor
         0 == Sensor no change
         1 == Reset Sensor
 

Calibration Method

Every Scanner need some method to correct the imperfectness of Electro-Opto Device, this section describe how we do it. Also Color CIS's image performance is worse then CCD's, our system need some more complicated method to do it.

Sheet-Fed Mode

Inside the accessory, our system has one 'Calibration Card' which include some 'Uniform Bright Area', 'Uniform Black Area', and 'Uniform Gary Area'. The use of it is described belows.

After we do all the calibration, the data should be saved to some '.INI' file in order to let the scanned image looks good. Important Notes: Before any scanning, the driver should check this file, if not present then the driver should pop-up one diag-box to inform user she/he need to do it again. Also the date of this file should be maintain, every three months, the driver should inform the user to do it again if the image do not look good in the default setting.

Flat-Bed Mode

In the flat bed mode, since the calibration paper is hided inside the engine. It do not have any chance to dirt it, we should built this paper inside it instead of using calibration chart. The 'Reference Paper' should include 'Uniform Bright Area', 'Uniform Black Area', and 'Uniform Gray Area'. All the calibration method is the same as above.

Image Quality Specification

Geometric Accuracy

Horizontal Registration : +/- 3mm
Vertical Start Line Accuracy : +/- 3mm
Horizontal Magnification : +/- 3%
Vertical Magnification : +/- 5%
Skew : +/- 3 Degrees
Straightness : 6mm
Distortion : +/- 1mm
Consistancy : In 10 Scans, the data for above specification is within 5%

Image Response

All this test should be done after calibration
Black Level : When scan the area of 2% reflectance, the average data for all three channel should fall between 2 - 8.
Gray Level : When scan the area of 71% reflectance, the average data for all three channel should fall between 190 - 220
Gamma Gain : When scan the 2%, 10%, 40%, 71%, and 84%, the average form by these 5 channel should plot one straight line that will be covered by Gamma Curve 0.95 - 1.05
SNR : When scan 200 lines at 40% reflectance, the SNR should be higher then 30dB.

Total System Performance:

All these tests should be done after calibration
Resolution : When scan the PM189D test chart, the resolution should be higher then 200DPI.
Line Non-Uniformity : Should be under 10%
Neighbor Pixel Non-Uniformity : Should be under 2%. This specification will create strip line in the image(Black, White). Under 1:1 view, user can't find any strip line under any scan modes.
Consistency : In 10 scans last for three hours, all the above specification should not deviate more then 10%.
--U27V7sseS5--