CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

manchester decode question
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bulut_01



Joined: 24 Feb 2024
Posts: 317

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 9:41 am     Reply with quote

PrinceNai wrote:
Quote:
After setting princenai preamble bits ignore to 0, can I read data like this in the code you last sent ?


I'm sorry, I don't understand the question. What does a logic analyzer setting have to do with a reception and decoding on a PIC?


Tell me, it has something to do with it. In the picture, where I drew red, when I set the preamb bits ignore setting to 0, I see different data. When I set it to 1, I see different data. In the last code you published, I can see the data when this setting is 1.
PrinceNai



Joined: 31 Oct 2016
Posts: 554
Location: Montenegro

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 9:55 am     Reply with quote

Yes, that was the whole point. To ignore the first symbol after the long preamble because I think it is not part of the data, but only a start bit.
PrinceNai



Joined: 31 Oct 2016
Posts: 554
Location: Montenegro

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 10:03 am     Reply with quote

Logic analyzer settings confirm this. It doesn't ask you how many symbols you will ignore at the end of a stream, it asks how many you'll ignore at the start. By ignore I mean not count as data.
bulut_01



Joined: 24 Feb 2024
Posts: 317

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 10:15 am     Reply with quote

PrinceNai wrote:
Logic analyzer settings confirm this. It doesn't ask you how many symbols you will ignore at the end of a stream, it asks how many you'll ignore at the start. By ignore I mean not count as data.


If the data solved without ignoring is incorrect, then the data solved by setting it to 1 is correct.
bulut_01



Joined: 24 Feb 2024
Posts: 317

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 10:18 am     Reply with quote

PrinceNai wrote:
Yes, that was the whole point. To ignore the first symbol after the long preamble because I think it is not part of the data, but only a start bit.


How do you understand what you're saying? Ignore or not count the first bit.
PrinceNai



Joined: 31 Oct 2016
Posts: 554
Location: Montenegro

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 10:52 am     Reply with quote

Quote:
By ignore I mean not count as data.


I wrote that maybe two posts ago.
bulut_01



Joined: 24 Feb 2024
Posts: 317

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 11:17 am     Reply with quote

PrinceNai wrote:
Quote:
By ignore I mean not count as data.


I wrote that maybe two posts ago.


I'm asking how you understood that bit to be ignored? Based on what did you ignore it ?
PrinceNai



Joined: 31 Oct 2016
Posts: 554
Location: Montenegro

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 1:18 pm     Reply with quote

I had to count. In tenth message of this thread I told you you have 65 symbols. That doesn't divide by 8 too good. A few messages after that I told you that your analyzer very likely, but in my humble opinion definitely, decodes the data incorrectly. Then I suggested to take the first symbol as a start bit. Analyzer supports that, which makes me believe that it is a widely used way of outputting Manchester coded stream. That is all. Then I wrote something that decodes your data according to that. If you have reason to believe this is not the correct way, by all means do it differently, write something that will give you the result you are comfortable with. When you do it, please share, because I invested some time in this and would really like to know how to do it right next time. The input from your side was as it was. I'd like to see it as it is on the picture. A few questions. How do you know data comes out LSB first? How do you know it is encoded Thomas style? Change any of those two and results will be completely different.
bulut_01



Joined: 24 Feb 2024
Posts: 317

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 1:35 pm     Reply with quote

PrinceNai wrote:
I had to count. In tenth message of this thread I told you you have 65 symbols. That doesn't divide by 8 too good. A few messages after that I told you that your analyzer very likely, but in my humble opinion definitely, decodes the data incorrectly. Then I suggested to take the first symbol as a start bit. Analyzer supports that, which makes me believe that it is a widely used way of outputting Manchester coded stream. That is all. Then I wrote something that decodes your data according to that. If you have reason to believe this is not the correct way, by all means do it differently, write something that will give you the result you are comfortable with. When you do it, please share, because I invested some time in this and would really like to know how to do it right next time. The input from your side was as it was. I'd like to see it as it is on the picture. A few questions. How do you know data comes out LSB first? How do you know it is encoded Thomas style? Change any of those two and results will be completely different.


okey. I'm just asking out of curiosity, I have no prejudices about this.
temtronic



Joined: 01 Jul 2010
Posts: 9568
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 3:21 pm     Reply with quote

yes, 8 doesn't go into 65 very nicely !
I don't assume 8 bits make a byte.
reminds me of one system I worked on.... 22 bits of serial data.
stare at it long enough and it's 'obvious'....
TWO start bits, 4 'adrs',8 'data', 8 'control'
bulut_01



Joined: 24 Feb 2024
Posts: 317

View user's profile Send private message

PostPosted: Thu Jul 24, 2025 3:43 pm     Reply with quote

temtronic wrote:
yes, 8 doesn't go into 65 very nicely !
I don't assume 8 bits make a byte.
reminds me of one system I worked on.... 22 bits of serial data.
stare at it long enough and it's 'obvious'....
TWO start bits, 4 'adrs',8 'data', 8 'control'


I have a surprise for you Temtronic, be careful about the encryption algorithm of the remote I'm working on.. Very Happy
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group