Sine oscillator and LCD

You can't get sin waves out of a single digital pin.
You can get PWM signals out of some pins which you can smooth with a filter but they are not very good.

but when I try to combine the two codes...just error.

See this:-
http://www.thebox.myzen.co.uk/Tutorial/Merging_Code.html