Correct ATtiny84 LIN pinout mappings

This commit is contained in:
2026-05-25 15:17:14 +02:00
parent 3448744673
commit 77ff8b973b
2 changed files with 11 additions and 10 deletions
+6 -6
View File
@@ -2,13 +2,13 @@
#include <SoftwareSerial.h>
#include "lin_frame.h"
#define IR_ARDUINO_PIN 10
#define LED_PIN 3
#define IR_ARDUINO_PIN PIN_PA0 // Digital pin 10
#define LED_PIN PIN_PA7 // Digital pin 3
#define RX_PIN 8
#define TX_PIN 2 // Unused dummy pin for SoftwareSerial TX
#define FAULT_PIN 9
#define CS_PIN 11
#define RX_PIN PIN_PB2 // Digital pin 2
#define TX_PIN PIN_PB0 // Digital pin 0 (Unused dummy pin or LIN TX)
#define FAULT_PIN PIN_PB1 // Digital pin 1
#define CS_PIN PIN_PB3 // Digital pin 11
#define SYN_FIELD 0x55
#define SWM_ID 0x20
+5 -4
View File
@@ -9,10 +9,11 @@ It decodes steering wheel navigation buttons from the vehicle's LIN bus and tran
| ATtiny84 Pin | Digital Pin (Arduino) | Function | Description |
| :--- | :--- | :--- | :--- |
| **PA0** | `10` | IR Output | Direct-wired to Raspberry Pi GPIO 24 |
| **PA5** | `8` | LIN RX | SoftwareSerial RX from MCP2004 RXD |
| **PA1** | `9` | LIN FAULT/TXE | MCP2004 Fault Detect / Transmit Enable |
| **PA2** | `11` | LIN CS | MCP2004 Chip Select (Active High) |
| **PA6** | `3` | Debug LED | Flash on command transmission |
| **PB2** | `2` | LIN RX | SoftwareSerial RX from MCP2004 RXD |
| **PB0** | `0` | LIN TX | SoftwareSerial TX (Unused dummy) |
| **PB1** | `1` | LIN FAULT/TXE | MCP2004 Fault Detect / Transmit Enable |
| **PB3** | `11` | LIN CS | MCP2004 Chip Select (Active High) |
| **PA7** | `3` | Debug LED | Flash on command transmission |
## Key Mapping