Author |
Message |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Mon Feb 24, 2025 1:28 pm Subject: manchester decode |
 |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Mon Feb 24, 2025 11:45 am Subject: manchester decode |
It is interesting that the code that works with ext_int does not work with the ioc_a1 interrupt.
I do not know about your chip, but I can confirm (tested) that with the changes described earlier th ... |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Mon Feb 24, 2025 9:07 am Subject: manchester decode |
I'm not close to my computer right now. I did try your code a day or two ago. You didn't copy it correctly, it doesn't compile. At least declaration of buffer is missing. I do not have your chip, so I ... |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Sat Feb 22, 2025 6:05 pm Subject: manchester decode |
Post your setup code for both versions......
Yes. With external interrupt the direction of change is set manually in code according to what you are looking for in any particular state. The way it w ... |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Thu Feb 13, 2025 7:04 am Subject: manchester decode |
Another small suggestion:
#define PREAMBLE_MIN_TIME 7 * TE //6
If the preamble is 7*TE long, don't go so narrow. The point here is simply to always miss the synch bits. 6.5, 6.8, ok. There will ... |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Thu Feb 13, 2025 6:30 am Subject: manchester decode |
The way I see it, you have finally won :-). That was the whole idea, to get 14 bytes of coded data and get 7 bytes of decoded data. From the picture I'd say that's exactly it.
Great :-) |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Wed Feb 12, 2025 6:49 pm Subject: manchester decode |
The only number that is meant to be changed inside the defines is TE. That is the width of the data bit or 640us in your case. All the other are based on that one.
PREAMBLE_MAX_TIME 8 * TE
PREAMBL ... |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Wed Feb 12, 2025 11:30 am Subject: manchester decode |
In your settings, the code is stuck at the beginning.
Where exactly?
I just tried again. With the test program and the timings I have there it doesn't. 20x, 20x the same data appears on the receiv ... |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Wed Feb 12, 2025 10:27 am Subject: manchester decode |
I didn't go further:
#define TRANSITION_MIN_TIME 8 * TE // same here when sampling
#define TRANSITION_MAX_TIME 12 * TE |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Wed Feb 12, 2025 8:16 am Subject: manchester decode |
Then use Timer1. Change all references from Timer0 to Timer1. Mind you, overflow isn't 1us. Timer increments by 1 in 1us. Overflow is 65ms |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Wed Feb 12, 2025 7:47 am Subject: manchester decode |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
will not produce 1us Timer0 step with 32MHz clock. Check Timer0 setup in my code. |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Sun Feb 09, 2025 3:10 pm Subject: manchester decode |
Pickit3.
Below is the comparison between two streams you sent, 44 and 55. Green portions were the same for both.
https://ibb.co/B2MpDfh0 |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Sun Feb 09, 2025 1:07 pm Subject: manchester decode |
Never had a problem or noticed any difference so far. I also never checked if the .hex is different with that option enabled. Did a quick build with it turned off now and the .hex size stays the same. ... |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Sun Feb 09, 2025 12:17 pm Subject: manchester decode |
It can't, that is where this bit is located on 18f46k22. I wrote in one of the previous posts that you'll have to find that bit for your PIC. Yours is in the OPTION_REG, bit 6. Page 176 of datasheet.
... |
Topic: manchester decode |
PrinceNai
Replies: 294
Views: 54468
|
Forum: General CCS C Discussion Posted: Sun Feb 09, 2025 11:19 am Subject: manchester decode |
What exactly do you mean by "inverted"? Inverted Manchester logic (that is taken care of in the code, comment/un-comment one line) or sent out LSB first? Last two pictures sure do look very ... |
|