Skip to content

1. Setup

Jonathan Ma edited this page Mar 14, 2024 · 2 revisions

Wiring

Wirings are from ChipSat -> Arduino

SPI Programming

Arduino 1 (For uploading code)

  • SCK -> Pin 13
  • MI(SO) -> Pin 12
  • MO(SI) -> Pin 11
  • RST -> Pin 10
  • VCC -> 5V
  • GND -> GND

Arduino 2 (For serial output, make sure to use same ground)

  • TX -> TX
  • RX -> RX

Serial Programming

  • TX -> TX
  • RX -> RX
  • RST -> RESET
  • VCC -> 5V
  • GND -> GND

Uploading Code to ChipSats

1. Configure the programmer

  1. Make sure "Tools > Programmer > Arduino as ISP" is checked
  2. Set the target board to Arduino Uno
  3. Load the program "Examples > 11.ArduinoISP > ArduinoISP"
  4. Upload this program to the Uno

Using Arduino IDE

2. Configure the target

  1. Follow the instructions of step 3 of the tutorial here to add the MiniCore library to the Arduino IDE
  2. Set the target board to "MiniCore > ATmega328"
  3. Ensure the variant is "328P / 328PA"
  4. Burn the bootloader onto the ChipSat from "Tools > Burn Bootloader"
  5. Upload ChipSat code using "Sketch > Upload Using Programmer"

Using PlatformIO

Note that if this is your first time uploading code to the ChipSat, you must complete the Arduino IDE steps above before you can use PlatformIO.

2. Upload to target

  1. Upload using the "program_via_ArduinoISP" environment

Helpful Links

Use Arduino as ISP to Burn Bootloader on AVR Microcontrollers

Programming an AVR ATmega328P with an Arduino.pdf

Common Problems

Problem: Failure to build; PlatformIO is throwing an error related to a ".sconsign311.tmp" file
Solution: Delete the .pio folder and build again

Clone this wiki locally