Discussion in "Project Help" started by    yasir mahmood abbasi    Jan 29, 2008.
Tue Jul 08 2008, 01:38 pm
#11

I do not have any idea how to invert the bits..?




say2paul you can use "CPL" instruction in asm and in C you know the complement instruction



Arun
Tue Jul 08 2008, 10:35 pm
#12
sorry I am newbie

Can you please explain with C example..!
Wed Jul 09 2008, 11:17 pm
#13



think you would have to invert the bits before it gets to the rx pin,else with the start and stop bits of the frame inverted,the controller will not be able to make out the serial frame.

sashijoseph



Dear Sashi, Can you please explain it in detail. I do not have any idea how to invert the bits..?

say2paul



Hi Paul,
For an asynchronous transmission the data byte is sanwiched between a start bit and one or two stop bits.This constitutes a serial frame.
The start bit is always 0 and stop bit(s) are always 1.
Now,the tsop presents a low output when it receives a burst of ir ie with an input 1,it's output is 0.
Similarly when it's input is 0 ie no ir,it's output is high.

So when it receives the start bit it's output turns 1,instead of 0.This is read by the Rx pin which cannot decipher it as a start bit and hence the frame is not recognised.

Thus you are required to invert the output of the tsop before it reaces the Rx pin and not in software.
You could use a transistor inverter.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am