Skip to content

Does the PIC and Si4010 code generate exactly the same signal? #5

@nicholas-gh

Description

@nicholas-gh

I've determined that

abButtonFrame[0] = 0x55;
abButtonFrame[1] = 0x55;
abButtonFrame[2] = 0x55;
abButtonFrame[3] = 0x51; // Tesla specific data
abButtonFrame[4] = 0xd3;
abButtonFrame[5] = 0x4c;
abButtonFrame[6] = 0x33;
abButtonFrame[7] = 0x33;
abButtonFrame[8] = 0xd3;
abButtonFrame[9] = 0xb2;
abButtonFrame[10] = 0xb4;
abButtonFrame[11] = 0x52;
abButtonFrame[12] = 0xcb;
abButtonFrame[13] = 0x32;
abButtonFrame[14] = 0xd5;
abButtonFrame[15] = 0xd2;
abButtonFrame[16] = 0xA8;
abButtonFrame[17] = 0x69;
abButtonFrame[18] = 0xa6;
abButtonFrame[19] = 0x99;
abButtonFrame[20] = 0x99;
abButtonFrame[21] = 0x69;
abButtonFrame[22] = 0x59;
abButtonFrame[23] = 0x5a;
abButtonFrame[24] = 0xa9;
abButtonFrame[25] = 0x65;
abButtonFrame[26] = 0x99;
abButtonFrame[27] = 0x6a;
abButtonFrame[28] = 0x69;
abButtonFrame[29] = 0xd4;
abButtonFrame[30] = 0x34;
abButtonFrame[31] = 0xd3;
abButtonFrame[32] = 0xcc;
abButtonFrame[33] = 0xcc;
abButtonFrame[34] = 0xb4;
abButtonFrame[35] = 0x2c;
abButtonFrame[36] = 0xad;
abButtonFrame[37] = 0xd4;
abButtonFrame[38] = 0xb2;
abButtonFrame[39] = 0x4c;
abButtonFrame[40] = 0xb5;
abButtonFrame[41] = 0x34;
is the same data as https://teslamotorsclub.com/tmc/posts/2383825/ - after I spotted the note about LSB. The Si4010 code is 'ready to send', so manchester encoding, preamble, message-repeats markers are all already in it; and since the 'message-repeats' marker (100?) isn't a full byte I see how the repeated data actually doesn't look repeated in the Si4010 code.

The data at

movlw 0x12
call MC_TX
movlw 0x95
call MC_TX
movlw 0x53
call MC_TX
movlw 0x67
call MC_TX
movlw 0x1B
call MC_TX
movlw 0x43
call MC_TX
movlw 0x20
call MC_TX3
is almost the same; but the last few bytes of the repeated message seems to differ.

I think the PIC code generates either

010101100101100110010110011001100110011001011010011010010110101001010110100110100110010101011010 100101

or potentially (if I'm confused how (MC_TX3)[https://github.com/mstegen/Open-Chargeport/blob/4fdffded66910fe04250e5dc19f3d89ede9bd17c/sourcecode/OpenChargeport_10F200.asm#L83] works)

010101100101100110010110011001100110011001011010011010010110101001010110100110100110010101011010 100

and the Si4010 and 'rpitx' examples generate

0101011001011001100101100110011001100110010110100110100101101010010101101001101001100101010110100101 100

I assume all three of these examples work, and the Tesla port doesn't notice the small variation?

If it works (and I assume it must do since it's here), then the PIC code has the most concise representation of the Tesla button code I've come across so far.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions