A semiconductor device includes a semiconductor chip having a main surface provided
with an integrated circuit including a photoelectric converter and a first wiring
for electrically connecting the integrated circuit of the semiconductor chip to
respective external terminals. The semiconductor device also includes a sealing
resin for sealing the main surface of the semiconductor chip and the first wiring,
formed so as to have an opening over the surface of the integrated circuit and
a light-transmitting cap for covering the opening of the sealing resin.