The present invention relates to a method and apparatus for converting current signal to two voltage level conversion through an adaptive thresholding. 
Current comparators are important building blocks in the design of optical signal processing, electronic signal processing and data conversion circuits, In many of the existing analog current comparators, the input current is first converted into a voltage signal.  This voltage signal is then compared to a voltage threshold and the output is a two level voltage signal.  The current-to-voltage conversion scheme is either performed using a process of charge accumulation or using resistive device.  The use of a resistive device may cause serious accuracy problems due to transistor mismatch while the use of charge accumulation requires linear capacitors and introduces delays.  For voltage comparators, transistor mismatch is unavoidable causing threshold shifting.  Moreover, many voltage comparators are op-amp-based, which may not be silicon-space-efficient. 
Some current detection circuits based on MOS transistor features have been reported in the literature; for instance, the current Schmitt-trigger (Z. Wang and Guggenbxc3xchl.  xe2x80x9cNovel CMOS current Schmitt trigger.xe2x80x9d Electronics Letters, vol.  24, No 24, November 1988, pp.  1514-1516), current detectors with feedback structures (H. Trxc3xa4ff.  xe2x80x9cNovel approach to high speed CMOS current comparators,xe2x80x9d Electronics Letters, vol.  28, No3, January 1992, pp.  310-312; A. T. K. Tang and C. Toumazou.  xe2x80x9cHigh performance CMOS current comparator,xe2x80x9d Electronics Letters, vol.  30, No.1, January 1994, pp.  5-6; G. Linàn-Cembrano et al.  xe2x80x9cA robust high-accuracy high-speed continuous-time CMOS current comparator,xe2x80x9d Electronics Letters, vol.33, December 1997, pp.2082-2084.),  and switched-current comparators (A. Worapishet et al.  xe2x80x9cEnhanced switched-current comparator,xe2x80x9d Electronics Letters, vol.35, No.10, May 1999, pp.  767-768).  These circuits produce a two level output voltage according to the polarity of the input current, instead of performing a current comparison with a specified value of the threshold. 
Mead (C. A. Mead xe2x80x9cAdaptive retina,xe2x80x9d Analog VLSI Implementation of Neural Systems, C. Mead and M. Ismail, Eds.,  chapter 10, Kluwer Academic Publishers, 1989, pp.239-246) proposed an adaptive retina in order to cope with the transistor mismatch issue.  The adaptive retina, uses floating gates to correct the transistor parameter dispersion.  Unfortunately, this solution requires a double-poly technology for circuit implementation, thus making it incompatible with the present digital implementation technology using a single-poly process. 
Lavainne et al (F. Lavainne, Y.Ni, P. de Carnxc3xa9, F. Devos xe2x80x9cAn analog adaptive smart image sensor for spatio-temporal information extraction,xe2x80x9d Proc.  of ISPRS Intercommission Workshop xe2x80x9cFrom pixels to Sequencesxe2x80x9d, Zurich, March, 1995, pp.  259-264) have proposed an adaptive process to make a uniform performance of the photocurrent comparator cell in a 2D optical sensor matrix.  The comparator uses a classical capacitive current-voltage converter cascaded with an op-amp based voltage comparator and combined with a feedback circuit to carry out the adaptive compensation.  Unfortunately, such circuit has the disadvantage that the speed of the circuit is limited by the charge accumulation process, multiple clocks are needed to process control, and a large silicon space is required to accommodate the large number of devices including a linear capacitor needed for the circuit. 
There is a need to develop a current comparator which converts a current into a two-level voltage. 
It is an object of the present invention to provide a method and apparatus for converting a current signal into a two-level voltage signal depending on the value of the current signal. 
It is an object of the present invention to provide a method and apparatus for converting a current signal into a two-level voltage signal depending on the value of the current signal, which method and apparatus is insensitive to transistor mismatch. 
It is another object of the present invention to provide a method and apparatus for converting a current signal into a two-level voltage signal depending on the value of the current signal, which works with low current e.g. nano Ampere range. 
It is another object of the present invention to provide a method and apparatus for converting a current signal into a two-level voltage signal depending on the value of the current signal, which is insensitive to transistor mismatch and which does not introduce significant delays. 
It is another object of the present invention to provide a method and an apparatus for converting a current signal into a two-level voltage signal depending on the value of the current signal which operates with a threshold variation of about 1% or less. 
It is another object of the present invention to provide a method and apparatus for converting a current signal into a two-level voltage signal depending on the value of the current signal wherein the width of the transition region of the transfer characteristic is tuneable. 
According to one aspect of the invention, there is provided a method for converting an input current signal into a two-level output voltage signal depending on a threshold current signal value and using a transistor, the method comprising the steps of receiving the threshold current signal value, memorizing the threshold value by setting up the transistor in a configuration wherein the output voltage has a certain value; receiving the input current signal to be compared to the threshold current signal value; comparing the input current signal to the threshold current signal value; outputting a two-level output voltage signal depending on the input current signal value and the threshold current signal value. 
According to another aspect of the invention there is provided an apparatus for converting an input current signal into a two-level output voltage signal depending on a threshold current signal value, the converter comprising a first circuit for converting the input current signal into the output voltage signal, the first circuit comprising an output transistor, the output transistor providing the output voltage signal, a voltage to current converter, the voltage to current converter receiving a controlled voltage and providing a feedback current signal to the output transistor of the first circuit, the feedback current signal entering the output transistor and modifying the output voltage signal to be equal to an intermediary voltage corresponding to a threshold current generating the controlled voltage signal during a set-up, a set-up switch receiving the output voltage signal and providing the controlled voltage signal, wherein the switch enables a setup of the threshold current signal value with a specific input current signal value when the transistor is closed.