Function generator using AD9835 with Raspberry Pi

I did. waiting for replies.

I have been stuck on this problem for more than a week now! The library i use makes arduino codes compatible on raspberry pi. I have no idea why the MOSI pin is behaving this way!