Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

32 bit ASK demodulation support #8

Closed
ozkangoksu opened this issue Nov 25, 2022 · 3 comments
Closed

32 bit ASK demodulation support #8

ozkangoksu opened this issue Nov 25, 2022 · 3 comments

Comments

@ozkangoksu
Copy link

Hello.

I'm trying to implement a 32 bit remote receiver and looking a way to use your project.

My 32 bit remote pattern is:
One frame code structure of this project is (20bit address+5bit key value+3bit PID code+4bit check code+syn code)
The code type of this project has 4 bytes of data in one frame, CODE1, CODE2, CODE3, CODE4, which are sent in order from high to low. The first 20BIT is the remote control address value,
21BIT-25BIT is the key value, 26-28bit is the PID code, and 29-32BIT is the check code.
Each BIT pattern "1" code: 720us high level + 240us low level "0" code: 240us high level + 720us low level

So the question is what should I do to reach that goal?

@nimaltd
Copy link
Owner

nimaltd commented Nov 26, 2022

hello. All bit change store in ask struct's buffer. you have to change ask_available() function to detect your algorithm

@ozkangoksu
Copy link
Author

Ok that's nice to hear.
I'm newbie with stm32 and RF communication. May I ask some hints about my remote and algorithm if you don't mind?

This is the datasheet of my remote:
433 MHz Remote Control.pdf

This is Remote's RF structure:
image

I tried rc-switch project with an arduino and rc-switch can decode my remote with their protocol 1 as below:

04:10:57.252 -> Decimal: 3899580674 (32Bit) Binary: 11101000011011101110000100000010 Tri-State: not applicable PulseLength: 252 microseconds Protocol: 1
04:10:57.389 -> Raw data: 6116,732,240,732,248,728,244,236,736,732,248,236,732,244,732,244,740,240,728,732,244,736,240,244,732,728,244,728,248,52,52,104,40,88,1052,1684,16,1160,32,1680,24,60,268,24,36,36,2992,44,3496,564,68,48,88,452,208,2680,40,40,1328,96,200,68,620,160,52,

If you don't mind, can you pinpoint the important and hard to understand changes and values?

@ozkangoksu
Copy link
Author

For 32 bit support I've changed Byte_len and it works now.
#define ASK_MIN_BYTE_LEN 3 // byte
#define ASK_MAX_BYTE_LEN 3 // byte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants