A direct digital frequency synthesizer and a synthesizing method thereof. A known grating structure is built upon a substrate. The rail and slider have teeth which releasably engage with one another for locking the slider at selected positions along the rail. Upon forming a TFT section island-shape semiconductor layer so as to provide a TFT, a hole section island-shape semiconductor layer is also formed in the area of the contact hole. The outer case contracts after it is formed and is press-contact with the cylindrical section so that a gap is hardly generated.