I have made animal detector. But when detection happen at that time i want to send bit to serially connected 8051

1 view (last 30 days)
I have made animal detector. But when detection happens at that time i want to send bit to serially connected 8051. Because i want to control RELAY switch and LED's which are connects with 8051.
So what are the codes for it ?? help me out please.
thank you.

Accepted Answer

Walter Roberson
Walter Roberson on 29 Apr 2014
If you are attempting to use a serial port to do this, then it is not possible. The 8051 serial port is not able to accept a single bit at a time. Serial ports transmit multiple bits in a group, with the group proceeded with a "start bit" and the group is followed by a "stop bit". Typically you cannot send less than 7 data bits at a time.
Did you solve your problem with COM2 not being available?
  2 Comments
Hetu Patel
Hetu Patel on 29 Apr 2014
Edited: Hetu Patel on 29 Apr 2014
Actually i have no idea about which micro-controller i should have to use. so I have not trying yet. Please refer me that which controller can I use for my application(external alarm,relay,LED switching) ?? In real i want to start some LED's and ALARM when my detector detects any animal in it. SO please help me and prefer Codes. waiting for your answer. thank you
Walter Roberson
Walter Roberson on 29 Apr 2014
The easiest way would be to send a character instead of a bit. The code you posted in the newsgroup looked pretty close, but you need to solve the problem about COM2 not being available.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!