{"text_format":"1","workbook":"xlsx","n_sheets":1,"sheets":["calculator"],"not_rendered":{"charts":0,"images":0,"macros":0,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"calculator","index":0,"n_rows":27,"n_cols":11,"rows_kept":27,"cut":false,"hidden":false,"merged":[[20,10,26,10],[0,2,0,9],[0,0,1,0],[0,10,1,10],[11,10,17,10]]}
["ID",null,"Bitwise value",null,null,null,null,null,null,null,"Comment"]
[null,"pid (hex)","7 (P1)","6 (P0)",5,4,3,2,1,0]
[28,{"$f":"BIN2HEX(_xlfn.CONCAT(C3:J3))","v":"A8"},{"$f":"IF(NOT(_xlfn.XOR(I3,G3,F3,E3)),1,0)","v":1},{"$f":"IF(_xlfn.XOR(J3,I3,H3,F3),1,0)","v":0},{"$f":"INT(LEFT(RIGHT(HEX2BIN($A3,8),E$2+1),1))","v":1},{"$f":"INT(LEFT(RIGHT(HEX2BIN($A3,8),F$2+1),1))","v":0},1,0,0,0,"receive ID (PID1)"]
[27,{"$f":"BIN2HEX(_xlfn.CONCAT(C4:J4))","v":"E7"},{"$f":"IF(NOT(_xlfn.XOR(I4,G4,F4,E4)),1,0)","v":1},{"$f":"IF(_xlfn.XOR(J4,I4,H4,F4),1,0)","v":1},{"$f":"INT(LEFT(RIGHT(HEX2BIN($A4,8),E$2+1),1))","v":1},0,0,1,1,1,"receive ID (PID1)"]
[29,{"$f":"BIN2HEX(_xlfn.CONCAT(C5:J5))","v":"E9"},{"$f":"IF(NOT(_xlfn.XOR(I5,G5,F5,E5)),1,0)","v":1},{"$f":"IF(_xlfn.XOR(J5,I5,H5,F5),1,0)","v":1},{"$f":"INT(LEFT(RIGHT(HEX2BIN($A5,8),E$2+1),1))","v":1},0,1,0,0,1,"transmit ID (PID2)"]
["2B",{"$f":"BIN2HEX(_xlfn.CONCAT(C6:J6))","v":"2B"},{"$f":"IF(NOT(_xlfn.XOR(I6,G6,F6,E6)),1,0)","v":0},{"$f":"IF(_xlfn.XOR(J6,I6,H6,F6),1,0)","v":0},{"$f":"INT(LEFT(RIGHT(HEX2BIN($A6,8),E$2+1),1))","v":1},0,1,0,1,1,"transmit ID (PID2)"]
["2A","6A",0,1,{"$f":"INT(LEFT(RIGHT(HEX2BIN($A7,8),E$2+1),1))","v":1},0,1,0,1,0,"transmit ID (PID3)"]
[]
["Solution 2",null,null,null,null,null,null,null,null,null,"RED = bits that are ignored in comparison"]
[]
["Solution - 2"]
["IDSLAVETASKBYTE\n= OR(PID1, PID2,PID3...)",{"$f":"BIN2HEX(CONCATENATE(C12,D12,E12,F12,G12,H12,I12,J12))","v":"EF"},{"$f":"IF(OR(C3:C9)=FALSE,0,1)","v":1},{"$f":"IF(OR(D3:D9)=FALSE,0,1)","v":1},1,0,1,1,1,1,"For Solution-2\n - Assumes Master sends Transmit frame as a publisher (has PID + Data Byte)\n-  Hence Transmit ID match should also result in Receive ID match, so that data is received by the Slave first, before it transmits to avoid collision"]
["IDSLAVETASKBYTE - FILTERED RX",null,{"$f":"IF(C16=1,\"X\",C12)","v":"X"},{"$f":"IF(D16=1,\"X\",D12)","v":"X"},1,0,"X","X","X","X"]
["IDSLAVETASKBYTE - FILTERED TX",null,{"$f":"IF(C18=1,\"X\",C12)","v":"X"},{"$f":"IF(D18=1,\"X\",D12)","v":"X"},1,0,1,"X","X","X"]
[]
["RXMASK\n=XOR (AND(PID1,PID2,PID3…), IDSLAVETASKBYTE)",{"$f":"BIN2HEX(CONCATENATE(C16,D16,E16,F16,G16,H16,I16,J16))","v":"CF"},{"$f":"IF(_xlfn.XOR(AND(C3:C7),C12),1,0)","v":1},{"$f":"IF(_xlfn.XOR(AND(D3:D7),D12),1,0)","v":1},0,0,1,1,1,1]
[]
["TXMASK (in the AND operation do not include receive ONLY PID)\n=XOR (AND(PID2,PID3...), IDSLAVETASKBYTE)",{"$f":"BIN2HEX(CONCATENATE(C18,D18,E18,F18,G18,H18,I18,J18))","v":"C7"},{"$f":"IF(_xlfn.XOR(AND(C5:C7),C12),1,0)","v":1},{"$f":"IF(_xlfn.XOR(AND(D5:D7),D12),1,0)","v":1},0,0,0,1,1,1]
[]
["Solution - 1 or Solution - 3"]
["IDSLAVETASKBYTE\n= OR(PID1,AND(PID2,PID3))",{"$f":"BIN2HEX(CONCATENATE(C21,D21,E21,F21,G21,H21,I21,J21))","v":"A8"},{"$f":"IF(AND(C5:C9)=FALSE,C3,1)","v":1},{"$f":"IF(AND(D5:D9)=FALSE,D3,1)","v":0},1,0,1,0,0,0,"For Solution-1\n- Assumes Master sends Transmit frame as a publisher (has PID + Data Byte)\n- Hence once Transmit ID match occurs it puts SW delay for data to be recieved before it transmits.\n\nFor Solution-3\n- Assumes Master sends Transmit frame as a subscriber (Only Has PID)\n- Hence once Transmit ID match occurs it aspects slave to transmit on LIN Bus right away without recievin data, so this does not need to result in Receive ID match."]
["IDSLAVETASKBYTE - FILTERED RX",null,{"$f":"IF(C25=1,\"X\",C21)","v":1},{"$f":"IF(D25=1,\"X\",D21)","v":"X"},{"$f":"IF(E25=1,\"X\",E21)","v":1},{"$f":"IF(F25=1,\"X\",F21)","v":0},{"$f":"IF(G25=1,\"X\",G21)","v":1},{"$f":"IF(H25=1,\"X\",H21)","v":"X"},{"$f":"IF(I25=1,\"X\",I21)","v":"X"},{"$f":"IF(J25=1,\"X\",J21)","v":"X"}]
["IDSLAVETASKBYTE - FILTERED TX",null,{"$f":"IF(C27=1,\"X\",C21)","v":"X"},{"$f":"IF(D27=1,\"X\",D21)","v":"X"},1,0,1,0,"X","X"]
[]
["RXMASK\n(XOR of IDSLAVETASKBYTE and PID1)\n=XOR (OR(PID1 [RX PIDS]), IDSLAVETASKBYTE)",{"$f":"BIN2HEX(CONCATENATE(C25,D25,E25,F25,G25,H25,I25,J25))","v":"47"},{"$f":"IF(_xlfn.XOR(OR(C3:C4),C21),1,0)","v":0},{"$f":"IF(_xlfn.XOR(OR(D3:D4),D21),1,0)","v":1},0,0,0,1,1,1]
[]
["TXMASK\nALL ZEROES --> OR=0\nALL ONES --> AND=1\nALL SAME--> ALL ZEROES OR ALL ONES --> OR(OR=0,AND=1)\n\nOLD FORMULA:\n\n=if(PID2[n]=PID3[n]) then\n        if (PID2[n]=IDSLAVETASKBYTE[n]) then\n              TXMASK[n] = 0;\n        else\n              TXMASK[n] = 1;\n   else\n       TXMASK[n] = 1;",{"$f":"BIN2HEX(CONCATENATE(C27,D27,E27,F27,G27,H27,I27,J27))","v":"C3"},{"$f":"IF(NOT(OR(OR(C5:C7,C21)=FALSE,AND(C5:C7,C21)=TRUE)),1,0)","v":1},{"$f":"IF(NOT(OR(OR(D5:D7,D21)=FALSE,AND(D5:D7,D21)=TRUE)),1,0)","v":1},0,0,0,0,1,1]