![]() |
Forum Index : Microcontroller and PC projects : How to learn RF remote codes?
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
Loop until pin16=0 will happen frequently If pin16 = 0 will also happen frequently I think The idea of running a counter is to ensure that the ZERO is reasonably long. Peter |
||||
Azure![]() Guru ![]() Joined: 09/11/2017 Location: AustraliaPosts: 446 |
Just to be clear, Sync pulse starts with a short high followed by a long low, followed by first bit. So in my mind (can't code at the moment while working on set), we need to detect the positive edge then make sure if stays low for long enough to be a sync without any other change. To do this we wait for the next positive pulse and elapsed timer should be big enough to match sync pulse time, otherwise it's just noise. @Grogster: That noise definitely means we need to detect a valid sync pulse and be able to timeout or detect a new sync pulse if it is corrupted during transmission (flooding by another transmission during the one we started to read). |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
Here is a link to an un-squished GIF of the above. White noise till about 50mS, then data packets on the right. Smoke makes things work. When the smoke gets out, it stops! |
||||
Azure![]() Guru ![]() Joined: 09/11/2017 Location: AustraliaPosts: 446 |
Great to see, much more resemblance to a data stream than I imagined. I guess that is why several have the option to add squelch at the cost of sensitivity to reduce false data. I am confident that we can create a bit of code using edge detecting (interrupt driven)with some edge timing to reliably read a valid data stream from something like your sample. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
I like your(and PeterB's) optimism! ![]() The PT2262/2272 encoder/decoder pair are much easier to use, but the 1527 is smaller and simpler from a PCB design point of view, so I understand why that chip is in so many things, but it's a shame there is not a matching decoder chip for the 1527 - it would make life easier at the other end for people. ![]() I can link you to the other GIF images if you like. They will be cleaner/clearer then what was posted here. Just let me know if you want me to do that. Here is another logic analyser image for the 1527 data. This one came from the PICAXE forum. Here is the PICAXE 08M2 code for learning the 1527 data. This might help with some details - or not. Smoke makes things work. When the smoke gets out, it stops! |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
I think it is dead easy and I think Azure has the right idea so between us you will have an elegant solution in the very near future. Have confidence my boy. Peter |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
You folks know your bit-banging and manipulation. I much prefer pre-defined protocols like asynchronous serial, I2C, SPI.... Throw me a un-defined data-stream, and I'm lost! ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Azure![]() Guru ![]() Joined: 09/11/2017 Location: AustraliaPosts: 446 |
It is predefined, it is just what method you use to receive and interpret it. I am sure TBS members will come up with an elegant solution. I will even be happy to try and help explain the logic and workings behind any code I put up. Sorry I am flat out with work at the moment, I would love to dive right into setting up some test hardware and do some coding and debugging. It will have to wait a few days (until the weekend) before I can put some serious effort in. |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
Are you comfortable with generating code for my idea? (part 1) I am also fairly busy at the moment and I am slow/bad at generating code. Give it a try. you have nothing to lose but your sanity. Peter |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
Yes, I will have a play along the lines you suggest if I get time. Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
Perhaps I should have said: "Any un-defined within MMBASIC."! ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Azure![]() Guru ![]() Joined: 09/11/2017 Location: AustraliaPosts: 446 |
![]() That settles it, once we get some normal (MMBasic) code done we need to use it as the logic for a function to receive undefined bit streams. ![]() |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
Grogster, Can you supply the logic analyser output as a file instead of image? A second or two of noise followed by 2 or 3 cycles of real data. I would prefer ols format but willing to look at whatever you have. Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
No, I don't think so. That's why I posted screenshots. The Saleae Logic is a great bit of kit, but the software does not allow you to export any captured data, so others can load it and look at the data you have captured. ![]() This is a BIG disappointment, IMHO. I will look and see if perhaps there is a new version of the Logic software. Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
There is a Save menu item under Options in the latest version of the software. VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
Ahhhhh - Lovely! Thanks. ![]() HERE is a link to the .logicdata file. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
Can you try again and choose to export in CSV format. PeterM wrote a Cfunction for transmitting bitbanger data and disco4now used it to write an Arlec mains switch transmitter. The Arlec bit pattern looks very much like your data. If I can read your data, I can use the Arlec code to produce a simulator for your transmitters (complete with white noise preamble). That will make writing receiver code easier. Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
OK, Standby..... Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
OK, here you go: LINK TO CSV FILE This is with the DEFAULT SETTINGS in Logic 1.2.10 Channel 0 only, as that was the only one I had connected. Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
That looks better. I can read the file OK and found where the data started. It starts at sample no ~5600 and runs for ~1000 samples. ![]() You can easily see the short, long and sync timing in the excel chart There are a few 'errors' in the first pulse train so that is good to have for testing. I have domestic duties for a while but should be able to get a simulator going in a few days. Jim VK7JH MMedit |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |