Merge pull request #1 from sonocotta/features/rev-b-updates

Rev B changes
This commit is contained in:
anabolyc
2023-01-19 16:08:56 +01:00
committed by GitHub
7 changed files with 23975 additions and 2 deletions

37
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: PlatformIO CI
on: [ push, pull_request, workflow_dispatch ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
working-directory: ./firmware/t1616-starter
run: pio run

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "firmware/jtag2updi"]
path = firmware/jtag2updi
url = https://github.com/anabolyc/jtag2updi

View File

@@ -70,7 +70,21 @@ Spence Konde created another great [writeup](https://github.com/SpenceKonde/AVR-
Method (c) is disqualified on 1-Series chip because of RESET/UPDI pin collision, and both (a) and (b) work equally well. Difference being what is easier for you: (a) dedicate Arduino Nano board for programming or (b) do solder job on your usb-serial adapter.
![image](https://user-images.githubusercontent.com/5459747/206929018-e960566d-2edd-4ede-aa5d-861d47c59a57.png)
### Revision A (Discontinued)
| Method | Connection |
|----------|------------|
| jtag2updi | ![image](https://user-images.githubusercontent.com/5459747/213477557-20c45e7f-9749-4db9-b5e8-835daf2b69b4.png)
| SerialUPDI<br/>(recommended) | ![image](https://user-images.githubusercontent.com/5459747/213477231-9fa7431a-e2d6-4d7b-93d9-fbb924b21496.png)
### Revision B (Current latest)
Starting from revision B diode between TX and RX pins are included on the board, so you can use unmodified USB-Serial adapter.
| Method | Connection |
|----------|------------|
| jtag2updi | ![image](https://user-images.githubusercontent.com/5459747/213477813-b20dfe72-d417-455c-b683-b1e41a4e2247.png)
| SerialUPDI<br/>(recommended) | ![image](https://user-images.githubusercontent.com/5459747/213477716-04c15d4e-4179-488a-910e-8a37a4a4ce2f.png)
### Arduino IDE

1
firmware/jtag2updi Submodule

Submodule firmware/jtag2updi added at fc3229e79a

View File

@@ -3,6 +3,7 @@
#define PIN_LED PIN_PB4 // 5
#define PIN_RGB PIN_PA7
#define PIN_BTN PIN_PA0
uint8_t seq = 0;
@@ -11,6 +12,7 @@ Adafruit_NeoPixel pixels(1, PIN_RGB, NEO_GRB + NEO_KHZ800);
void setup() {
pinMode(PIN_LED, OUTPUT);
pinMode(PIN_BTN, INPUT);
delay(1000);
Serial.begin(115200);
@@ -19,11 +21,19 @@ void setup() {
pixels.begin();
}
uint8_t btn_state = HIGH;
void loop() {
seq++;
Serial.print('.');
if (btn_state != digitalRead(PIN_BTN)) {
btn_state = !btn_state;
Serial.print("Button state is ");
Serial.println(btn_state);
}
digitalWrite(PIN_LED, seq % 2);
pixels.clear();
@@ -31,5 +41,5 @@ void loop() {
pixels.setPixelColor(0, pixels.Color((0xff - seq) % 0xff, seq % 0xff, seq % 0x7f + (0xff - seq) % 0x7f));
pixels.show();
delay(250);
delay(500);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff