A device unit 46 is constituted by including a lead frame 50 on which a
light-emitting mold portion 48 and a light-receiving mold portion 49 are
mounted. Moreover, an exterior casing for housing the device unit 46 is
constituted of two parts dividable into an upper casing 45 and a lower
casing 47. Thus, by holding the device unit 46 by the upper casing 45 and
the lower casing 47, external connection terminals 43 constructed of one
end portion of the lead frame 50 can be fixed to the exterior casing and
positioned in a connector portion 42. Therefore, by reducing the parts
count to three and allowing the device unit 46 to be fixed to the
exterior casing by a fixed fitting mechanism of the upper casing 45 and
the lower casing 47 without performing welding, soldering, thermal
caulking or the like, the assembling becomes easy.