randy:
thanks for the response. I had tried all those. If given any lesser than 8 bits, the complete stream is messy.
After meddling around for a bit I found out what the issue was.
For people who might face such issue, here is the solution. You can thank me when you face this problem.
there is an attribute to the serial port(infact any terminal) called "istrip". You need to disable this. istrip strips the higher bit in an incoming stream and hence I was loosing out bits.
you can use stty -istrip -F /dev/ttySx where x is your serial port number.
tata for now
KD