binary and invert converion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-06-21 5:40 AM
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 ?
- Labels:
-
GNSS Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-21 11:58 PM
IR Remote with STM32
Today in this tutorial I am going to interface IR Remote with STM32 microcontroller. IR Remote Controllers and receivers follow some standard protocols for sending and receiving data. Some of these protocols are NEC , JVC , SIRC etc. Here we will be discussing only the NEC protocol. I will also use LCD16x2 to display the key pressed on the remote. But first let’s see what NEC protocol is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-22 12:02 AM
Interfacing IR Sensor With STM32 Discovery Board:
https://www.mathaelectronics.com/interfacing-ir-sensor-with-stm32-discovery-board/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-22 12:40 AM
thank you but thet are using TSOP,we are not using TSOP,we are using Simple IR Recevier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-22 12:41 AM
thank you but they are just interface the IR module ,but we want to tranmit the signal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-22 3:25 AM - edited ‎2023-07-22 3:26 AM
Hello
If external logic inverter helps to get right data, probably setting Rx line inversion on does the same thing (or Tx line). It seems that data is totally interved when it goes thru IR transmitter and receiver.
If you are using STM32/HAL/Cube you should find this setting under advanced features of Uart/Usart:
Maybe this way you finally get your data inverted :D
Br J.T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-23 8:57 PM
right
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-23 8:58 PM
but may i know what operation they have used ?:D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-23 10:13 PM - edited ‎2023-07-23 10:15 PM
@Ranjeet Singh wrote:but may i know what operation they have used ?:D
It's a polarity reversal, so if the transmitter sends in normal mode, and the receiver receives with reversed polarity, the bits are reversed. It should look similar to what the bitwise function does (var2 = ~(val1);).
Note: The TTL signal (0V to 5V or 3.3V) is already inverted in the RS232 protocol, so it's good not to confuse things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-23 11:08 PM
when i use (var2 = ~(val1);). this operation the data not match it becoome another data and that is the confusion why it become another data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-23 11:12 PM
@Ranjeet Singh wrote:when i use (var2 = ~(val1);). this operation the data not match it becoome another data and that is the confusion why it become another data
Your problem is really a mystery, if maybe you could share your code for someone to test maybe someone can give some more assertive help.
Anyway, it might be interesting to watch these debug videos:
STM32CubeIDE Advanced Debug Features
