How to decode communication


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: How to decode communication

    I'm still kind of lost but seem to be making a little progress. I can see that the entire packet takes 20mS to transmit. It's hard to tell where one piece of data ends and the other begins. I can see the data change when I press buttons on the controller but some of the data isn't used for this application. In other words, those bits/bytes are just taking up space but must be included when the packet is transmitted.

    Perhaps this will help you guys help me. I concentrated on the ones digit for the home team score. I think it takes 750uS to transmit the ones digit and I based that assumption on when the edge falls to when it rises again at the end. However, some of the data takes about 500uS. Is it safe to assume that it takes 750uS for a byte and maybe 500uS for a bit?

    To duplicate the packet (I'm starting with the ones digit), I have the data from the PIC going to the input of a ULN2003A. On the output side I'm using a 10K pullup and then measuring it with the scope. One problem I'm having is that I can't quite get the timing right. I've attached two pictures that show my problem. The first picture is of the source. I'm trying to duplicate what is seen here. In the middle (-250uS from center to +500uS from center) is the number 2. Name:  #2 - Channel 1 (Source).JPG
Views: 853
Size:  189.8 KB

    Here is my attempt to make the number 2. As you can see, I had to adjust the sec/div to 100uS and the second pulse in the number two isn't the same as the source.Name:  #2 - Channel 2 (PIC).JPG
Views: 952
Size:  174.4 KB

    Regarding the data being inverted, what is the normal way? High to low or low to high?

    I've tried adjusting my settings but nothing seems to help. The relevant settings are:


    Code:
    RCSTA1 = $90 
    TXSTA1 = $24 
    DEFINE HSER_BAUD 300
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    BAUDCON1 = %00111000
    
    And then I send the data like this:
    
    
    MAINLOOP:
    HSEROUT [dec 2]
    PAUSE 100
    GOTO MAINLOOP

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default Re: How to decode communication

    From the images, I do not think it is an UART transmission. Can you zoom out the source capture a little so that you center the '2' and we can see around it a bit more detail?

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: How to decode communication

    I've attached pictures of the PCB, a picture of the #2 zoomed in and a picture of the #2 zoomed out. Name:  PCB.JPG
Views: 932
Size:  215.0 KBName:  #2 zoomed out.JPG
Views: 1181
Size:  202.1 KBName:  #2 zoomed in.JPG
Views: 1195
Size:  170.1 KB

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default Re: How to decode communication

    Looking at the components, it might be a current loop signalling. Is it?

    Are there any communications related components below the LCD ? Cant see them in the photo.

  5. #5
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: How to decode communication

    There's nothing under the LCD. What you see is what you get. Correct me if I'm wrong but it can't be a current loop because I have nothing connected to the output except the scope probe.

  6. #6
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: How to decode communication

    The signal output appears to be coming from a 2N3417 (collector), which also appears to be in parallel with a TIP30C (collector).

  7. #7
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: How to decode communication

    Something else popped into my head. The time between the start of each byte is exactly 1,250uS. The time it takes to transmit the total packet is 20mS, which means there are 16 digits. Can I do all of this manually? To be more specific, can I use GOSUB's for each number and just specify exactly how long I need the pulses to be? The data is predictable and I'm not seeing anything that doesn't look strange. There are only numbers transmitted and they are 0-9. My thought is something like this:

    Code:
    MAINLOOP:
    
    'GATHER NUMBERS TO BE TRANSMITTED
    
    SELECT CASE D0
        CASE 0
            GOSUB ZERO
        CASE 1
            GOSUB ONE
    END SELECT
    
    SELECT CASE D1
        CASE 0
            GOSUB ZERO
        CASE 1
            GOSUB ONE
    END SELECT
    
    
    SELECT CASE D2
        CASE 0
            GOSUB ZERO
        CASE 1
            GOSUB ONE
    END SELECT
    
    ......
    
    SELECT CASE D15
        CASE 0
            GOSUB ZERO
        CASE 1
            GOSUB ONE
    END SELECT
    
    PAUSE 5
    
    GOTO MAINLOOP
    
    .....
    
    ZERO:
    DO3=1
    PAUSEUS 550
    DO3=0
    PAUSEUS 75
    DO3=1
    PAUSEUS 50
    DO3=0
    PAUSEUS 575
    RETURN
    
    ONE:
    DO3=1
    PAUSEUS 50
    DO3=0
    PAUSEUS 75
    DO3=1
    PAUSEUS 175
    DO3=0
    PAUSEUS 300
    DO3=1
    PAUSEUS 50
    DO3=0
    PAUSEUS 600
    RETURN
    
    TWO:
    DO3=1
    PAUSEUS 250
    DO3=0
    PAUSEUS 75
    DO3=1
    PAUSEUS 150
    DO3=0
    PAUSEUS 75
    DO3=1
    PAUSEUS 250
    DO3=0
    PAUSEUS 450
    RETURN
    
    THREE:
    DO3=1
    PAUSEUS 400
    DO3=0
    PAUSEUS 150
    DO3=1
    PAUSEUS 250
    DO3=0 
    PAUSEUS 450
    RETURN
    
    FOUR:
    DO3=1
    PAUSEUS 75
    DO3=0
    PAUSEUS 75
    DO3=1
    PAUSEUS 150
    DO3=0
    PAUSEUS 150
    DO3=1
    PAUSEUS 250
    DO3=0
    PAUSEUS 550
    RETURN
    
    FIVE:
    DO3=1
    PAUSEUS 150
    DO3=0
    PAUSEUS 75
    DO3=1
    PAUSEUS 150
    DO3=0
    PAUSEUS 75
    DO3=1
    PAUSEUS 325
    DO3=0
    PAUSEUS 475
    RETURN
    
    SIX:
    DO3=1
    PAUSEUS 150
    DO3=0
    PAUSEUS 75
    DO3=1
    PAUSEUS 475
    DO3=0
    PAUSEUS 550
    RETURN
    
    SEVEN:
    DO3=1
    PAUSEUS 325
    DO3=0
    PAUSEUS 300
    DO3=1
    PAUSEUS 150
    DO3=0
    PAUSEUS 475
    RETURN
    
    EIGHT:
    DO3=1
    PAUSEUS 800
    DO3=0
    PAUSEUS 450
    RETURN
    
    NINE:
    DO3=1
    PAUSEUS 325
    DO3=0
    PAUSEUS 150
    DO3=1
    PAUSEUS 325
    DO3=0
    PAUSEUS 450
    RETURN

Similar Threads

  1. DCF77 decode
    By mombasa in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th January 2015, 18:27
  2. How to decode an SMS which looks like this ...
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 8th October 2009, 00:26
  3. encode/decode manchester
    By a_critchlow in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 6th February 2006, 08:50
  4. Decode RC5 ?
    By charudatt in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd November 2005, 10:12
  5. RC5 Encode / Decode
    By charudatt in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 18th October 2003, 05:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts