Sign up to receive free email alerts when patent applications with chosen keywords are publishedSIGN UP

Abstract:

Disclosed is a semiconductor device, comprising a driver that causes
first through third infrared LEDs to emit light sequentially at
prescribed times; an infrared light sensor that receives infrared light
that is emitted by the first through the third infrared LEDs and
reflected by a reflecting object, and generates photoelectric currents at
levels corresponding to the intensity of the received infrared light; an
amplifier that generates first through third infrared light information,
on the basis of the photoelectric current that is generated by the
infrared light sensor, and which denote the intensity of the infrared
light; an A/D converter; and a linear/logarithmic converter apparatus. It
is thus possible to sense the movement of the reflecting object on the
basis of the first through the third infrared light information.

Claims:

1. A semiconductor device, comprising: first to N-th (N is an integer not
smaller than 2) driving terminals connected to first to N-th infrared
emitting units, respectively; a driving unit driving said first to N-th
infrared emitting units through said first to N-th driving terminals to
cause light emission from said first to N-th infrared emitting units at
mutually different timings; a first light receiving unit receiving
infrared light emitted from said first to N-th infrared emitting units
and reflected by a reflecting object, and generating a photo-electric
current of a level corresponding to intensity of the received infrared
light; an operation control unit generating first to N-th pieces of
infrared light information indicating intensity of infrared light emitted
from said first to N-th infrared emitting units respectively and
reflected by said reflecting object, based on the photo-electric current
generated by said first light receiving unit; and an output terminal for
outputting said first to N-th pieces of infrared light information to the
outside.

2. The semiconductor device according to claim 1, wherein said driving
unit supplies first to N-th driving currents to said first to N-th
infrared emitting units to cause light emission by said first to N-th
infrared emitting units, respectively; and said first to N-th driving
currents can be set individually.

3. The semiconductor device according to claim 1, wherein said operation
control unit controls said driving unit.

4. The semiconductor device according to claim 1, wherein said operation
control unit removes steady component from the photo-electric current
generated at said first light receiving unit, and generates said first to
N-th pieces of infrared light information based on the photo-electric
current with said steady component removed.

5. The semiconductor device according to claim 1, wherein said operation
control unit operates in accordance with a control signal; said device
comprising an input terminal for applying said control signal from
outside to said operation control unit.

6. The semiconductor device according to claim 5, wherein said operation
control unit includes a register for storing said first to N-th pieces of
infrared light information and said control signal.

7. The semiconductor device according to claim 1, further comprising: a
second light receiving unit generating a photo-electric current of a
level corresponding to intensity of incident visible light; wherein said
operation control unit generates a piece of visible light information
representing intensity of visible light entering said second light
receiving unit, based on the photo-electric current generated at said
second light receiving unit, and outputs the generated piece of visible
light information to the outside through said output terminal.

8. The semiconductor device according to claim 1, further comprising: a
power supply terminal for supplying a power supply voltage from outside
to said driving unit and said operation control unit; and a ground
terminal for supplying a ground voltage from outside to said driving unit
and said operation control unit.

9. An electronic apparatus, comprising: the semiconductor device
according to claim 1; and a detecting unit detecting a movement of said
reflecting object based on said first to N-th pieces of infrared
information from said semiconductor device.

10. A semiconductor device, comprising: a driving terminal connected to
an infrared emitting unit; a driving unit driving said infrared emitting
unit through said driving terminal to cause said infrared emitting unit
to emit light at a predetermined timing; a light receiving unit receiving
light emitted from said infrared emitting unit and reflected by a
reflecting object, and generating a photo-electric current of a level
corresponding to intensity of the received infrared light; an operation
control unit generating a piece of infrared light information
representing intensity of infrared light emitted from said infrared
emitting unit and reflected by said reflecting object, based on the
photo-electric current generated at said light receiving unit; and an
output terminal for outputting said piece of infrared light information
to the outside.

11. The semiconductor device according to claim 10, wherein said
operation control unit operates in accordance with a control signal; said
device further comprising an input terminal for applying said control
signal from the outside to said operation control unit.

12. The semiconductor device according to claim 11, wherein said
operation control unit includes a register for storing said piece of
infrared light information and said control signal.

13. An electronic apparatus, comprising: the semiconductor device
according to claim 10; and a detecting unit for detecting a movement of
said reflecting object based on said piece of infrared light information
from said semiconductor device.

Description:

TECHNICAL FIELD

[0001] The present invention relates to a semiconductor device and an
electronic apparatus using the same. More specifically, the present
invention relates to a semiconductor device for detecting a movement of a
reflecting object and to an electronic apparatus using the same.

BACKGROUND ART

[0002] Conventionally, a portable telephone having a touch panel of a
switch structure allowing key operations and a display device for
displaying keys and the like to be operated on the touch panel arranged
superposed thereon has been known (see, for example, Japanese Utility
Model Laying-Open No. 1-153759 (Patent Literature 1)).

[0003] Further, a portable telephone having a plurality of motion sensors
provided in a housing, for monitoring movements corresponding to dial
numbers based on output signal patterns of the motion sensors, and
dialing accordingly has also been known (see, for example, Japanese
Patent Laying-Open No. 2000-78262 (Patent Literature 2)).

[0004] Further, a device analyzing direction, intensity and number of
movements detected by a motion detecting unit, analyzing types of user
actions by calculating frequency distribution of movements and outputting
an operation instruction corresponding to the result of analysis has been
known (see, for example, Japanese Patent Laying-Open No. 2000-148351
(Patent Literature 3)).

[0008] The portable telephone according to Patent Literature 1 is operated
by the user directly touching the touch panel and, therefore, it has a
problem that the surface of touch panel becomes tainted and sensitivity
degrades.

[0009] Portable telephones according to Patent Literatures 2 and 3 require
provision of a plurality of motion sensors, resulting in larger size and
higher cost of the apparatuses. Further, it is necessary for the user to
move the housing and, therefore, there is a possibility that the housing
bumps against something and is broken.

[0011] Therefore, a main object of the present invention is to provide a
semiconductor device capable of detecting a movement of a reflecting
object in a contactless manner, without using any motion sensor, as well
as to provide an electronic apparatus using the same.

Solution to Problem

[0012] The present invention provides a semiconductor device, including:
first to N-th (N is an integer not smaller than 2) driving terminals
connected to first to N-th infrared emitting units, respectively; a
driving unit driving the first to N-th infrared emitting units through
the first to N-th driving terminals to cause light emission from the
first to N-th infrared emitting units at mutually different timings; a
first light receiving unit receiving infrared light emitted from the
first to N-th infrared emitting units and reflected by a reflecting
object, and generating a photo-electric current of a level corresponding
to intensity of the received infrared light; an operation control unit
generating first to N-th pieces of infrared light information indicating
intensity of infrared light emitted from the first to N-th infrared
emitting units respectively and reflected by the reflecting object, based
on the photo-electric current generated by the first light receiving
unit; and an output terminal for outputting the first to N-th pieces of
infrared light information to the outside.

[0013] Preferably, the driving unit supplies first to N-th driving
currents to the first to N-th infrared emitting units to cause light
emission by the first to N-th infrared emitting units, respectively; and
the first to N-th driving currents can be set individually.

[0014] Preferably, the operation control unit controls the driving unit.

[0015] Preferably, the operation control unit removes steady component
from the photo-electric current generated at the first light receiving
unit, and generates the first to N-th pieces of infrared light
information based on the photo-electric current with the steady component
removed.

[0016] Preferably, the operation control unit operates in accordance with
a control signal, and the device includes an input terminal for applying
the control signal from outside to the operation control unit.

[0017] Preferably, the operation control unit includes a register for
storing the first to N-th pieces of infrared light information and the
control signal.

[0018] Preferably, the semiconductor device further includes a second
light receiving unit generating a photo-electric current of a level
corresponding to intensity of incident visible light, and the operation
control unit generates a piece of visible light information representing
intensity of visible light entering the second light receiving unit,
based on the photo-electric current generated at the second light
receiving unit, and outputs the generated piece of visible light
information to the outside through the output terminal.

[0019] Preferably, the semiconductor device further includes a power
supply terminal for supplying a power supply voltage from outside to the
driving unit and the operation control unit; and a ground terminal for
supplying a ground voltage from outside to the driving unit and the
operation control unit.

[0020] Further, the present invention provides an electronic apparatus,
including: the above-described semiconductor device, and a detecting unit
detecting a movement of the reflecting object based on the first to N-th
pieces of infrared information from the semiconductor device.

[0021] Further, according to another aspect, the present invention
provides a semiconductor device, including: a driving terminal connected
to an infrared emitting unit; a driving unit driving the infrared
emitting unit through the driving terminal to cause the infrared emitting
unit to emit light at a predetermined timing; a light receiving unit
receiving light emitted from the infrared emitting unit and reflected by
a reflecting object, and generating a photo-electric current of a level
corresponding to intensity of the received infrared light; an operation
control unit generating a piece of infrared light information
representing intensity of infrared light emitted from the infrared
emitting unit and reflected by the reflecting object, based on the
photo-electric current generated at the light receiving unit; and an
output terminal for outputting the piece of infrared light information to
the outside.

[0022] Preferably, the operation control unit operates in accordance with
a control signal, and the device further includes an input terminal for
applying the control signal from the outside to the operation control
unit.

[0023] Preferably, the operation control unit includes a register for
storing the piece of infrared light information and the control signal.

[0024] According to a further aspect, the present invention provides the
above-described semiconductor device, and a detecting unit for detecting
a movement of the reflecting object based on the piece of infrared light
information from the semiconductor device.

Advantageous Effects of Invention

[0025] In the semiconductor device in accordance with the present
invention, light is emitted from the first to N-th infrared light
emitting units at mutually different timings, the infrared light emitted
from the first to N-th infrared light emitting units and reflected from
the reflecting object is converted to a photo-electric current by the
first light receiving unit, and the first to N-th pieces of infrared
light information representing intensities of the infrared light are
generated. Therefore, it becomes possible to detect a movement of the
reflecting object in contactless manner based on the first to N-th pieces
of infrared light information, without using any motion sensor.

BRIEF DESCRIPTION OF DRAWINGS

[0026]FIG. 1 is a block diagram representing a configuration of the
semiconductor device in accordance with an embodiment of the present
invention.

[0027]FIG. 2 shows a method of communication between the MCU and the data
register shown in FIG. 1.

[0028]FIG. 3 shows a configuration of a data register shown in FIG. 1.

[0029]FIG. 4 shows a configuration of a register ALS_CONTROL shown in
FIG. 3.

[0030]FIG. 5 shows a configuration of a register PS_CONTROL shown in FIG.
3.

[0031]FIG. 6 shows a configuration of a register I_LED shown in FIG. 3.

[0049] Driving terminals T1 to T3 are connected to cathodes of infrared
LEDs (Light Emitting Diodes) 31 to 33, respectively. Infrared LEDs 31 to
33 all receive, at their anodes, a power supply voltage VDD1. Proximity
sensor 2 includes a control circuit 3, a pulse generator 4, a driver 5,
an infrared sensor 6, an amplifier 7, an A/D converter 8, and a
linear/logarithmic converter 9. Control circuit 3 controls proximity
sensor 2 as a whole, in accordance with control signals stored in data
register 20.

[0050] Pulse generator 4 generates a pulse signal for driving infrared
LEDs 31 to 33. Driver 5 maintains each of driving terminals T1 to T3 at a
high-impedance state, and renders any of the driving terminals T1 to T3
grounded in response to the pulse signal generated by pulse generator 4.
It is possible to select, by the signals stored in data register 20,
which one, two, or three of the infrared LEDs 31 to 33 are to be used.
Further, it is possible to set, by the signals stored in data register
20, the current value to be caused to flow through each selected infrared
LED and the period of emission by each selected infrared LED (see FIGS.
3, 6, 7 and 9).

[0051] When any of driving terminals T1 to T3 is grounded by driver 5,
current flows through the infrared LED corresponding to the driver
terminal, and infrared light is emitted from the infrared LED. The
infrared light α emitted from the infrared LED is reflected by a
reflecting object 34 and enters infrared sensor 6. Infrared light from
the sun also enters infrared sensor 6. Infrared sensor 6 is formed, for
example, by a photo diode having peak wavelength of 850 nm. Infrared
sensor 6 generates a photo-electric current of a level corresponding to
the light intensity of incident infrared light α. The
photo-electric current contains pulse component derived from the infrared
light α from infrared LEDs 31 to 33 and a DC component derived from
the infrared light from the sun.

[0052] Amplifier 7 amplifies only the pulse component of photo-electric
current generated by infrared sensor 6, and outputs an analog voltage of
a level corresponding to the light intensity of infrared light α
incident on infrared sensor 6. A/D converter 8 converts the analog
voltage output from amplifier 7 to a digital signal. The level of analog
signal and the numerical value of digital signal are in linear relation.
Linear/logarithmic converter 9 calculates a log of the numerical value of
the digital signal generated by A/D converter 8, and stores an 8-bit
digital signal representing the calculated log in data register 20 (see
FIGS. 3 and 11).

[0053] Ambient light sensor 10 includes a visible light sensor 11, an
amplifier 12, a capacitor 13, an A/D converter 14, and a control circuit
15. Visible light β generated by a visible light source 35 in the
vicinity of semiconductor device 1 enters visible light sensor 11.
Visible light source 35 may be a fluorescent lamp, an incandescent lamp
or the sun. Visible light sensor 11 is formed, for example, of a photo
diode having peak wavelength of 550 nm. Visible light sensor 11 generates
a photo-electric current of a level corresponding to the intensity of
incident visible light β.

[0054] Amplifier 12 and capacitor 13 convert the photo-electric current to
an analog voltage. A/D converter 14 converts the analog voltage to a
16-bit digital signal and applies it to control circuit 15. Control
circuit 15 controls ambient light sensor 10 as a whole in accordance with
control signals stored in data register 20, and stores the digital signal
generated by A/D converter 14 in data register 20 (see FIGS. 3 and 4).

[0055] Oscillator 21 generates clock signals in accordance with the
control signals stored in data register 20. Timing controller 22 controls
operation timing of each of proximity sensor 2 and ambient light sensor
10 in synchronization with the clock signals from oscillator 21.

[0056] Signal output terminal T4 is connected to an MCU (Micro Control
Unit) 36 through a signal line, and connected to a line of a power supply
voltage VDD2 though a resistor element 37. Output circuit 23 applies an
interrupt signal INT to MCU 36, by setting a signal output terminal T4 to
the grounded state or floating state in accordance with an interrupt
signal INT stored in data register 20. The interrupt signal INT is
activated when intensity of infrared light α incident on infrared
sensor 6 exceeds a prescribed threshold value, or when intensity of
visible light β incident on visible light sensor 11 exceeds a
prescribed range. When to activate the interrupt signal INT can be set by
signals stored in data register 20 (see FIGS. 3, 10, 12 and 13).

[0057] A clock input terminal T5 is connected through a signal line to MCU
36, and connected to the line of power supply voltage VDD2 through a
resistor element 39. A serial data input/output terminal T6 is connected
through a signal line to MCU 36, and connected to the line of power
supply voltage VDD2 through a resistor element 38. MCU 36 applies the
clock signal SCL through signal input/output circuit 24 to data register
20, by setting clock input terminal T5 to the grounded state or floating
state. Further, MCU 36 applies the serial data signal SDA through signal
input/output circuit 24 to data register 20, by setting serial data
input/output terminal T6 to the grounded state or floating state.

[0062] To a power supply terminal T7, power supply voltage VDD3 for
driving semiconductor device 1 is applied. Further, to power supply
terminal T7, one electrode of a capacitor 40 for stabilizing power supply
voltage VDD3 is connected. The other electrode of capacitor 40 is
grounded. A ground terminal T8 is a terminal for letting out current from
LEDs 31 to 33, and it is grounded. A ground terminal T9 is a terminal for
applying ground voltage GND to internal circuits 2 to 15 and 20 to 25 in
semiconductor device 1. A test terminal T10 is set to the "H" level in a
test mode, and is grounded as shown in FIG. 1 in a normal operation.

[0063]FIG. 2 shows, from (a) to (d), a method of communication between
MCU 36 and data register 20. According to this method of communication,
data reading and data writing from a master to a plurality of slaves are
possible. Here, MCU 36 is the master and data register 20 is the slave. A
slave is selected by a 7-bit slave address (in the figure, 0111000).
Typically, a read/write flag is added to the 7-bit slave address. The
serial clock signal SCL is output from the master. The slave
inputs/outputs the serial data signal SDA in synchronization with the
serial clock signal SCL from the master. Specifically, the slave takes in
the serial data signal SDA in synchronization with the serial clock
signal SCL, and in reverse, outputs the serial data signal SDA in
synchronization with the serial clock signal SCL.

[0064] Information communication starts from a start condition ST from the
master side and ends at a stop condition SP. The start condition ST is
set when the serial data signal SDA changes from the "H" level to the "L"
level while the serial clock signal SCL is at the "H" level. The stop
condition SP is set when the serial data signal SDA changes from the "L"
level to the "H" level while the serial clock signal SCL is at the "H"
level.

[0065] Data bits are established while the serial clock signal SCL is at
the "H" level. The level of serial data signal SDA is kept constant while
the serial clock signal SCL is at the "H" level, and is changed while the
serial clock signal SCL is at the "L" level. The data unit is 1 byte (8
bits), and the data is transferred successively from the upper bit. At
every 1 byte, the receiving side returns a signal ACK (0 of 1 bit) to the
transmitting side. It is also possible to return a signal NACK (1 of 1
bit) after receiving 1 byte. The signal NACK is used when the master
notifies the slave of the end of transfer, at the time of data transfer
from the salve to the master.

[0066] A series of communications always starts at the start condition ST
from the master. One byte immediately following the start condition ST
contains 7 bits of slave address and 1 bit of read/write flag. The
read/write flag is set to 0 if transfer is from the master to the slave,
and it is set to 1 if the transfer is from the slave to the master. When
the slave receiving the slave address returns the signal ACK to the
master, communication between the master and the slave is established.

[0067] When an address of data register 20 as the slave is to be
designated, MCU 36 as the master sets the start condition ST, transmits
the slave address of 7 bits, sets the read/write flag to 0, transmits a
register address of 1 byte (in the figure, 100xxxxx) in response to the
signal ACK from the slave, and transmits the stop condition SP in
response to the signal ACK from the slave, as shown in FIG. 2(a). In the
figure, "x" represents 0 or 1.

[0068] When data is to be written designating an address of data register
20 as the slave, MCU 36 as the master sets the start condition ST,
transmits the slave address of 7 bits, sets the read/write flag to 0,
transmits a register address of 1 byte (in the figure, 100xxxxx) in
response to the signal ACK from the slave, and transmits the date byte by
byte, in response to the signal ACK from the slave. The slave returns the
signal ACK every time it receives the data of 1 byte. When the data
transmission ends, the master sets the stop condition ST, and the
communication ends, as shown in FIG. 2(b).

[0069] When data is to be read designating an address of data register 20
as the slave, MCU 36 as the master sets the start condition ST, transmits
the slave address of 7 bits, sets the read/write flag to 0, and transmits
a register address of 1 byte (in the figure, 100xxxxx) in response to the
signal ACK from the slave, as shown in FIG. 2(c).

[0070] Further, in response to the signal ACK from the slave, the master
again sets the start condition ST, transmits the slave address of 7 bits,
and sets the read/write flag to 1. The slave returns the signal ACK, and
transmits data byte by byte to the master. The master returns the signal
ACK every time it receives the data of 1 byte. Receiving the last data,
the master returns the signal NACK and then sets the stop condition SP,
and thus, the communication ends.

[0071] When data is to be read without designating an address of data
register 20 as the slave, MCU 36 as the master sets the start condition
ST, transmits the slave address of 7 bits, and sets the read/write flag
to 1, as shown in FIG. 2(d). The slave returns the signal ACK, and
transmits data byte by byte to the master. The master returns the signal
ACK every time it receives the data of 1 byte. Receiving the last data,
the master returns the signal NACK and then sets the stop condition SP,
and thus, the communication ends.

[0072]FIG. 3 shows the configuration of data register 20. Referring to
FIG. 3, addresses 80h to 86h and 92h to 99h of data register 20 are used
for reading and writing (RW) of information, whereas addresses 8Ah to 91h
are used for reading (R) information. Addresses 80h to 86h, 92h to 99h
and 8Ah to 91h each form a register. The address is in hexadecimal
notation (h).

[0073] In a register ALS_CONTROL at address 80h, pieces of information
related to ALS (Ambient Light Sensor) operation mode control and SW
(Software) reset are stored. In a register PS_CONTROL at address 81h,
pieces of information related to PS (Proximity Sensor) operation mode
control are stored. In a register I_LED at address 82h, pieces of
information related to selection of an LED to be activated, and setting
of currents of LEDs 31 and 32 are stored. In a register I_LED 33 at
address 83h, pieces of information related to setting of current of LED
33 are stored.

[0074] In a register ALS_PS_MEAS at address 84h, pieces of information
related to a forced mode trigger are stored. In a register PS_MEAS_RATE
at address 85h, pieces of information related to the PS measurement rate
in the stand alone mode are stored. In a register ALS_MEAS_RATE at
address 86h, pieces of information related to the ALS measurement rate in
the stand alone mode are stored. In a register PART_ID at address 8Ah,
part number and revised ID (Identification data), specifically, the ID of
proximity sensor 2, are stored. In a register MANUFACT_ID at address 8Bh,
an ID of the manufacturer of semiconductor device 1 is stored.

[0075] In a register ALS_DATA_0 at address 8Ch, a lower byte of result of
measurement of ambient light sensor 10 is stored. In a register
ALS_DATA_1 of address 8Dh, an upper byte of result of measurement of
ambient light sensor 10 is stored. In a register ALS_PS_STATUS at address
8Eh, pieces of information related to the measurement data and the state
of interrupt are stored.

[0076] In a register PS_DATA_LED31 at address 8Fh, proximity data from LED
31 (measurement data of infrared light from LED 31) is stored. In a
register PS_DATA_LED32 at address 90h, proximity data from LED 32
(measurement data of infrared light from LED 32) is stored. In a register
PS_DATA_LED33 at address 91h, proximity data from LED 33 (measurement
data of infrared light from LED 33) is stored.

[0077] In a register INTERRUPT at address 92h, pieces of information
related to setting of interrupt are stored. In a register PS_TH_LED31 at
address 93h, PS interrupt threshold value for LED 31 is stored. In a
register PS_TH_LED32 at address 94h, interrupt threshold value for LED 32
is stored. In a register PS_TH_LED33 at address 95h, interrupt threshold
value for LED 33 is stored.

[0078] In a register ALS_TH_UP_0 at address 96h, a lower byte of the upper
threshold value of ALS is stored. In a register ALS_TH_UP_1 at address
97h, an upper byte of the upper threshold value of ALS is stored. In a
register ALS_TH_LOW_0 at address 98h, a lower byte of the lower threshold
value of ALS is stored. In a register ALS_TH_LOW_1 at address 99h, an
upper byte of the lower threshold value of ALS is stored.

[0079] Next, main registers among the plurality of registers shown in FIG.
3 will be described in greater detail. As shown in (a) and (b) of FIG. 4,
addresses ADD7 to ADD3 of upper 5 bits of register ALS_CONTROL at address
80h are used as a reserve (RES) field, the following 1 bit address ADD2
is used as an SW reset field, and lower 2 bits ADD1 and ADD0 are used as
an ALS mode field. To each of addresses ADD7 to ADD3, 0 is written. To
address ADD2, 0 is written if initial reset is not to be started, and 1
is written if initial reset is to be started. To addresses ADD1 and ADD0,
00 or 01 is written if a standby mode is to be set, 10 is written if the
forced mode is to be set, and 11 is written if the stand alone mode is to
be set.

[0080] Further, as shown in (a) and (b) of FIG. 5, addresses ADD7 to ADD2
of upper 6 bits of register PS_CONTROL at address 81h are used as an NA
field, and lower 2 bits ADD01 and ADD0 are used as a PS mode field. Each
of addresses ADD7 to ADD3 is ignored. To addresses ADD1 and ADD0, 00 or
01 is written if a standby mode is to be set, 10 is written if the forced
mode is to be set, and 11 is written if the stand alone mode is to be
set.

[0081] Further, as shown in (a) and (b) of FIG. 6, addresses ADD7 and ADD6
of upper 2 bits of register I_LED at address 82h are used as PS
activation field, next 3 bits ADD5 to ADD3 are used as an electric
current field of LED 32, and lower 3 bits ADD2 to ADD0 are used as an
electric current field of LED 31. If LED 31 is to be activated and LEDs
32 and 33 are to be inactivated, 00 is written to upper addresses ADD7
and ADD6. If LEDs 31 and 32 are to be activated and LED 33 is to be
inactivated, 01 is written to upper addresses ADD7 and ADD6. If LEDs 31
and 33 are to be activated and LED 32 is to be inactivated, 10 is written
to upper addresses ADD7 and ADD6. If all LEDs 31 to 33 are to be
activated, 11 is written to upper addresses ADD7 and ADD6.

[0082] To middle addresses ADD5 to ADD3, any of 000 to 111 is written. If
the electric current value of LED 32 is to be set to 5, 10, 20, 50, 100
and 150 mA, 000 to 101 are written, respectively. If the electric current
value of LED 32 is to be set to 200 mA, either 110 or 111 is written.
Therefore, in semiconductor device 1, it is possible to set the electric
current value of LED 32 to a desired value among 5, 10, 20, 50, 100, 150
and 200 mA.

[0083] To lower addresses ADD2 to ADD0, any of 000 to 111 is written. If
the electric current value of LED 31 is to be set to 5, 10, 20, 50, 100
and 150 mA, 000 to 101 are written, respectively. If the electric current
value of LED 31 is to be set to 200 mA, either 110 or 111 is written.
Therefore, in semiconductor device 1, it is possible to set the electric
current value of LED 31 to a desired value among 5, 10, 20, 50, 100, 150
and 200 mA.

[0084] Further, as shown in (a) and (b) of FIG. 7, addresses ADD7 to ADD3
of upper 5 bits of register I_LED33 at address 83h are used as an NA (No
Assign) field, and lower 3 bits ADD2 to ADD0 are used as an electric
current field of LED 33. Each of addresses ADD7 to ADD3 is ignored. Any
of 000 to 111 is written to lower addresses ADD2 to ADD0. If the electric
current value of LED 33 is to be set to 5, 10, 20, 50, 100 and 150 mA,
000 to 101 are written, respectively. If the electric current value of
LED 33 is to be set to 200 mA, either 110 or 111 is written. Therefore,
in semiconductor device 1, it is possible to set the electric current
value of LED 33 to a desired value among 5, 10, 20, 50, 100, 150 and 200
mA.

[0085] Further, as shown in (a) and (b) of FIG. 8, addresses ADD7 to ADD2
of upper 6 bits of register ALS_PS_MEAS at address 84h are used as the NA
field, the next 1 bit address ADD1 is used as an ALS trigger field, and
the lower 1 bit ADD0 is used as a PS trigger field. Addresses ADD7 to
ADD2 are ignored. To address ADD1, if new ALS measurement is not to be
started, 0 is written, and if new ALS measurement is to be started, 1 is
written. To address ADD0, if new PS measurement is not to be started, 0
is written, and if new PS measurement is to be started, 1 is written.

[0086] Further, as shown in (a) and (b) of FIG. 9, addresses ADD7 to ADD4
of upper 4 bits of register PS_MEAS_RATE at address 85h are used as the
NA field, and lower 4 bits ADD3 to ADD0 are used as a PS measurement rate
field. Each of addresses ADD7 to ADD4 is ignored. Any of 0000 to 1111 is
written to lower addresses ADD3 to ADD0. If PS measurement rate is to be
set to 10, 20, 30, 50, 70, 100, 200, 500, 1000 and 2000 msec, 0000 to
1001 are written, respectively. It can be set to 2000 msec by writing any
of 1010 to 1111. Therefore, in semiconductor device 1, PS measurement
rate can be set to a desired value from 10 to 2000 msec.

[0087] Further, as shown in (a) and (b) of FIG. 10, addresses ADD7 to ADD0
of register ALS_PS_STATUS at address 8Eh are used as INT status field of
ALS, data status field of ALS, INT status field of LED 33, data status
field of LED 33, INT status field of LED 32, data status field of LED 32,
INT status field of LED 31 and data status field of LED 31, respectively.

[0088] To address ADD7, in ALS measurement, if the signal INT is to be
inactivated, 0 is written and if the signal TNT is to be activated, 1 is
written. To address ADD6, in ALS measurement, if data is already-read old
data, 0 is written, and if the data is not-yet-read new data, 1 is
written.

[0089] To address ADD5, in PS measurement of LED 33, if the signal INT is
to be inactivated, 0 is written and if the signal INT is to be activated,
1 is written. To address ADD4, in PS measurement of LED 33, if data is
already-read old data, 0 is written, and if the data is not-yet-read new
data, 1 is written.

[0090] To address ADD3, in PS measurement of LED 32, if the signal INT is
to be inactivated, 0 is written and if the signal INT is to be activated,
1 is written. To address ADD2, in PS measurement of LED 32, if data is
already-read old data, 0 is written, and if the data is not-yet-read new
data, 1 is written.

[0091] To address ADD1, in PS measurement of LED 31, if the signal INT is
to be inactivated, 0 is written and if the signal INT is to be activated,
1 is written. To address ADD0, in PS measurement of LED 31, if data is
already-read old data, 0 is written, and if the data is not-yet-read new
data, 1 is written.

[0092] Further, as shown in (a) and (b) of FIG. 11, addresses ADD7 to ADD0
of register PS_DATA_LED31 at address 8Fh are used as data field of LED
31. In addresses ADD7 to ADD0, PS measurement data of LED 31 are stored.

[0093] Addresses ADD7 to ADD0 of register PS_DATA_LED32 at address 90h are
used as data field of LED 32. In addresses ADD7 to ADD0, PS measurement
data of LED 32 are stored.

[0094] Addresses ADD7 to ADD0 of register PS_DATA_LED33 at address 91h are
used as data field of LED 33. In addresses ADD7 to ADD0, PS measurement
data of LED 33 are stored.

[0095] Further, as shown in (a) and (b) of FIG. 12, addresses ADD7 and
ADD4 of register INTERRUPT at address 92h are both used as the NA field,
and addresses ADD6 and ADD5 are used as an interrupt source field.
Further, address ADD3 is used as an output mode field, and address ADD2
is used as an INT polarity field. Addresses ADD1 and ADD0 are used as an
interrupt mode field. Addresses Add7 and ADD4 are ignored.

[0096] To addresses ADD6 and ADD5, 00 is written if an interrupt is
triggered by the ALS, 01 is written if an interrupt is triggered by LED
31, 10 is written if an interrupt is triggered by LED 32, and 11 is
written if an interrupt is triggered by LED 33.

[0097] To address ADD3, 0 is written if the level of an INT pin (signal
output terminal T4) is to be latched until register INTRRUPT is read, and
0 is written if the level of the INT pin is to be updated after each
measurement. To address ADD2, 0 is written if the INT pin is set to logic
0 ("L" level) when the signal INT is activated, and 1 is written if the
INT pin is set to logic 1 ("H" level) when the signal INT is activated.

[0098] To addresses ADD1 and ADD0, 00 is written if the INT pin is to be
inactivated (high impedance state), 01 is written if the PS measurement
can be triggered, 10 is written if the ALS measurement can be triggered,
and 11 is written if the PS and ALS measurements can be triggered.

[0099] Further, as shown in (a) and (b) of FIG. 13, addresses ADD7 to ADD0
of register PS_TH_LED31 at address 93h are used as a threshold field of
LED 31. In addresses ADD7 to ADD0, a threshold value of LED 31 is stored.

[0100] Addresses ADD7 to ADD0 of register PS_TH_LED32 at address 94h are
used as the threshold field of LED 32. In addresses ADD7 to ADD0, a
threshold value of LED 32 is stored.

[0101] Addresses ADD7 to ADD0 of register PS_TH_LED33 at address 95h are
used as the threshold field of LED 33. In addresses ADD7 to ADD0, a
threshold value of LED 33 is stored.

[0102] Further, as shown in FIG. 14, addresses ADD7 to ADD0 of register
PS_DATA_LED 31 at address 8Fh are used as the PS data field of LED 31. To
addresses ADD7 to ADD0, PS data of LED 31 are stored. By way of example,
if 10000101 is written to addresses ADD7 to ADD0, light intensity is
represented by 10A, where
A=(27+22+20)×0.097=133×0.097. Therefore, light
intensity is 10A=417 (ρW/cm2).

[0103]FIG. 15 is a time chart representing a measurement sequence of
proximity sensor 2. FIG. 15 shows an example in which all LEDs 31 to 33
are activated. Infrared LEDs 31 to 33 successively emit light, each for a
prescribed time period, in one measurement period. Here, twILED
represents duration of an LED current pulse (one emission time period of
each infrared LED), which is, for example, 300 μsec, and twILED2
represents accumulative duration of LED current pulse (time period from
the start of emission of infrared LED 31 to stop of emission of infrared
LED 33), which is, for example, 1 msec. Further, tMPS represents a
measurement time of the proximity sensor, which is, for example, 10 msec.
The result of measurement is generated within this period tMPS. The PS
measurement rate (measurement period) is used only in the stand alone
mode, and it is determined by the register PS_MEAS_RATE (85h) shown in
FIG. 9.

[0104] If a measurement command is written by the master to register
PS_CONTROL (81h) shown in FIG. 5, the first PS measurement is triggered.
A combination of infrared LEDs 31 to 33 is set by register I_LED (82h)
shown in FIG. 6 and register I_LED33 (83h) shown in FIG. 7. If infrared
LED 32 only is to be inactivated, there is no spare time between the
pulse of LED 31 and the pulse of LED 33.

[0105] In the forced mode, the PS measurement is done only once. The PS
trigger bit (ADD0 of 84h) is overwritten from 1 to 0 after the completion
of PS measurement. When 1 is written to the PS trigger bit by the master,
PS measurement is again started. In the stand alone mode, the PS
measurement is continued until the master designates another mode.
Measurement interval is determined by register PS_MEAS_RATE (85h) shown
in FIG. 9.

[0106] FIG. 16 is a time chart representing a measurement sequence of
ambient light sensor 10. In FIG. 16, tMALS represents the measurement
time of ambient light sensor, which is, for example, 100 msec. The result
of measurement is generated within this period. The ALS measurement rate
(measurement period) is used only in the stand alone mode, and it is
determined by register ALS_MEAS_RATE (86h). When a measurement command is
written by the master to register ALS_CONTROL (80h) shown in FIG. 4, the
first ALS measurement is triggered.

[0107] In the forced mode, the ALS measurement is done only once. The ALS
trigger bit (ADD1 of 80h) is overwritten from 1 to 0 after the completion
of ALS measurement. When 1 is written by the master to the ALS trigger
bit, the ALS measurement is again started. In the stand alone mode, the
ALS measurement is continued until the master designates another mode.
The measurement interval is determined by register ALS_MEAS_RATE (86h)
shown in FIG. 3.

[0108]FIG. 17 is a time chart representing, at (a) to (c), the interrupt
function. Specifically, FIG. 17(a) represents the interrupt signal INT in
a latch mode, FIG. 17(b) represents the interrupt signal INT in a
non-latch mode and FIG. 17(c) represents PS measurement value (PS
measurement data). As the source of interrupt, ALS measurement and any of
the three LEDs 31 to 33 may be selected as the source of interrupt as
shown in (a) and (b) of FIG. 12. Here, it is assumed that, by way of
example, LED 31 is selected as the source of interrupt.

[0109] As shown in FIG. 15, the PS measurement value is updated at every
measurement period tMPS. The threshold values VTH of LEDs 31 to 33 are
stored in register PS_TH_LED (93h, 94h, 95h). If the PS measurement value
for LED 31 exceeds the threshold value VTH, the interrupt signal INT
makes a transition from the inactive level ("L" level in the figure) to
the active level ("H" level in the figure).

[0110] The output mode of interrupt signal INT includes the latch mode and
the non-latch mode as shown in (a) and (b) of FIG. 12. In the latch mode,
the level of interrupt signal INT is latched until the master reads the
register INTERRUPT, as shown in (a) of FIG. 17. In the non-latch mode,
the level of interrupt signal INT is updated after each PS measurement,
as shown in (b) of FIG. 17. The same applies when LED 32 or 33 is
selected as the source of interrupt.

[0111] If the ALS measurement is selected as the source of interrupt, the
ALS measurement value is updated at every measurement period tMALS, as
shown in FIG. 16. The upper threshold value VTHU for the ALS measurement
is stored in register ALS_TH_UP (96h, 97h) shown in FIG. 3. The lower
threshold value for the ALS measurement is stored in register ALS_TH_LOW
(98h, 99h) shown in FIG. 3. If the ALS measurement value is between the
lower threshold value VTHL and the upper threshold value VTHU, the
interrupt signal INT is set to the inactive level (for example, "L"
level). If the ALS measurement value is lower than the lower threshold
value VTHL, or if the ALS measurement value is higher than the upper
threshold value VTHU, the interrupt signal INT is set to the active level
(for example, "H" level).

[0112] FIG. 18 shows, at (a) to (d), an appearance of semiconductor device
1. Specifically, in FIG. 18, (a) is a top view of semiconductor device 1,
(b) is a front view, (c) is a bottom view and (d) is a diagram of
arrangement of terminals T1 to T10 viewed from above semiconductor device
1. Referring to (a) to (d) of FIG. 18, semiconductor device 1 includes a
printed circuit board 1a. Printed circuit board 1a is formed to have a
square shape with the length of one side being, for example, 2.8 mm.

[0113] On a surface of printed circuit board 1a, circuits 2 to 15 and 20
to 25 shown in FIG. 1 are mounted. The surface of printed circuit board
1a is sealed with transparent resin 1b. The height of semiconductor
device 1 is, for example, 0.9 mm. On a back surface of printed circuit
board 1a, terminals T1 to T10 are provided. Terminals T1 to T10 are
arranged in a prescribed order, along four sides of printed circuit board
1a.

[0114] FIG. 19 shows an example of a method of using semiconductor device
1. Referring to FIG. 19, semiconductor device 1 is mounted, together with
three infrared LEDs 31 to 33, on a portable telephone 50. Portable
telephone 50 is formed to have a longitudinal rectangular shape. At the
central portion of portable telephone 50, a touch panel 51 is provided,
and a speaker 52 and a microphone 53 are provided above and below touch
panel 51, respectively. Infrared LED 31 is arranged at an upper right
corner on a surface of portable telephone 50; infrared LED 32 is arranged
at a position a prescribed distance away in the X direction (left
direction) in the figure from infrared LED 31; and infrared LED 33 is
arranged at a position a prescribed distance away in the Y direction
(downward direction) in the figure from infrared LED 31. Semiconductor
device 1 is arranged adjacent to infrared LED 31 in the X direction.

[0115]FIG. 20 shows semiconductor device 1 and infrared LED 31 mounted on
portable telephone 50. Referring to FIG. 20, semiconductor device 1 and
infrared LED 31 are arranged adjacent to each other on a surface of a
printed circuit board 54. On printed circuit board 1a of semiconductor
device 1, proximity sensor 2 and ambient light sensor 10 are mounted, and
the surface of printed circuit board 1a is sealed with transparent resin
1b. On printed circuit board 54, a transparent plate 56 is placed with a
light intercepting spacer 55 interposed, and by transparent plate 56,
semiconductor device 1 and infrared LED 31 are protected.

[0118] Specifically, MCU 36 detects illuminance of the place where
portable telephone 50 is used from the data signal (ALS measurement data)
from semiconductor device 1, and controls brightness of back light 57 in
accordance with the detected illuminance. Thus, an image displayed on
touch pane 51 can be made sharp and clear. Further, power consumption can
be reduced.

[0119] If it is detected that touch panel 51 of portable telephone 51
comes close to the ear of the user of portable telephone 50 from the data
signal (PS measurement data) from semiconductor device 1, MCU 36 stops
the function of touch panel 51. Thus, erroneous function otherwise caused
when the ear of the user of portable telephone 50 touches touch panel 51
can be prevented.

[0120] Further, MCU 36 detects hand gesture of the user of portable
telephone 50 based on PS measurement values representing intensity of
reflected light of infrared LEDs 31 to 33, and realizes the scroll
operation of images displayed on touch panel 51 in accordance with the
result of detection. Specifically, if the user of portable telephone 50
moves his/her hand in the X direction of FIG. 19 on the surface of
portable telephone 50, infrared LEDs 31 and 33 are first covered by the
hand and then infrared LED 32 is covered by the hand. In this case, the
intensity of reflected light of infrared LEDs 31 and 33 increases first,
and then the intensity of reflected light of infrared LED 32 increases,
as shown in FIG. 22(a). If the intensity of reflected light of infrared
LEDs 31 to 33 changes in the manner as shown in FIG. 22(a), MCU 36
determines that the user's hand moved laterally and, by way of example,
scrolls the images on touch panel 51 to the lateral direction.

[0121] If the user of portable telephone 50 moves his/her hand in the Y
direction of FIG. 19 on the surface of portable telephone 50, infrared
LEDs 31 and 32 are first covered by the hand and then infrared LED 33 is
covered by the hand. In this case, the intensity of reflected light of
infrared LEDs 31 and 32 increases first, and then the intensity of
reflected light of infrared LED 33 increases, as shown in FIG. 22(b). If
the intensity of reflected light of infrared LEDs 31 to 33 changes in the
manner as shown in FIG. 22(b), MCU 36 determines that the user's hand
moved longitudinally and, by way of example, scrolls the images on touch
panel 51 to the longitudinal direction.

[0122] As described above, by the present embodiment, movement of a
reflecting object can be detected in contactless manner without using any
motion sensor. Since motion sensor is not used, it is possible to reduce
the size, to reduce the cost and to simplify the structure of the
apparatus. Further, different from a portable telephone mounting a motion
sensor, it is unnecessary to move portable telephone 5 itself. Therefore,
it is unlikely that portable telephone 50 bumps against something and is
broken while it is moved.

[0123] The embodiments as have been described here are mere examples and
should not be interpreted as restrictive. The scope of the present
invention is determined by each of the claims with appropriate
consideration of the written description of the embodiments and embraces
modifications within the meaning of, and equivalent to, the languages in
the claims.