// One Start Bit\r
while (PDIDATA_LINE_PIN & PDIDATA_LINE_MASK);\r
TOGGLE_PDI_CLOCK;\r
- \r
+\r
+ TOGGLE_PDI_CLOCK;\r
+ \r
// Eight Data Bits\r
for (uint8_t i = 0; i < 8; i++)\r
{\r
- if (PDIDATA_LINE_PIN & PDIDATA_LINE_MASK)\r
- ReceivedByte |= 0x01;\r
+ if (!(PDIDATA_LINE_PIN & PDIDATA_LINE_MASK))\r
+ ReceivedByte |= 0x80;\r
\r
- ReceivedByte <<= 1;\r
+ ReceivedByte >>= 1;\r
\r
TOGGLE_PDI_CLOCK; \r
}\r