cancel
Showing results for 
Search instead for 
Did you mean: 

binary and invert converion

Ranjeet Singh
Senior

i am sending data on serial is 3 when is display is this 3 but i can conver in bninary then become 00110011 instead 00000011.and when i invert it then i got 01100110 instead of 11111100 ,why so ?

33 REPLIES 33

Hello

I think there is no mystery involved here. When Rx line is all time inverted, also the start bit is recognized in wrong position, since its identified from first falling edge (TTL level). That why the receviced character is inverted and also shifted, and it cannot be fixed in software level anymore since some data is lost in the beginning of character.  I guess you are also having UART frame errors internally since the stop bit is not reconized. 

So, right way is to adapt inversion to the hw level.

BR J.T

ok ,if start bit is recognized in wrong position then how oscillsoscope decode it  in exact same ?will you make a program if you think it is not mystery ?

RhSilicon
Lead

If the problem is still open, it might be a good idea to unmark the post already accepted as a solution (perhaps accidentally, due to a problem with the "Accept solution" button's update time) so that other users can try to help.

Not_Solution.png

Ranjeet Singh
Senior

kindly help