Skip to content

Commit

Permalink
Firmware upload instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
davideanastasia committed Jan 21, 2021
1 parent 2f00662 commit 203d2e2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Please refer to the [How To Build Loopy](./howto.md) page.

### Where can I find a PCB?

Please contact me if you need a PCB: I will try to have some available as long as there is demand for it.
Please contact me if you need a PCB: I will try to have some available as long as there is demand for it. Alternatively, you can check [my eBay profile](https://www.ebay.co.uk/usr/daviderocker82it).

### Why no display?

Expand All @@ -48,3 +48,4 @@ No. However, I could be interested in discussing a partnership. Please get in to
### Can I have the source code of the firmware?

No. At the moment, I have decided to keep the source code private. However, HEX file for the firmware is available in this repo, and you are free to program your own chip with it.
Check the [instructions on how to setup your microcontroller](./firmware.md).
37 changes: 37 additions & 0 deletions firmware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# How to Program Loopy

In order to program Loopy, you need:
- an atmega328(p) chip
- an AVR programmer (an inexhpensive USBasp is perfectly fine, like the one [here](https://www.bitsbox.co.uk/index.php?main_page=product_info&cPath=140_161_163&products_id=1233))
- a 10 to 6 pin adapter if your programmer is not supplied with one, like the one [here](https://www.bitsbox.co.uk/index.php?main_page=product_info&cPath=140_161_163&products_id=2848)
- [avrdude](https://www.nongnu.org/avrdude/) correctly installed on your computer (installation are dependent on your OS of choice -- if you are on Mac, the easier way is to use [brew](https://formulae.brew.sh/formula/avrdude))

Once your computer is setup, you need to run three commands on your terminal.

The first command is mandatory to initialise the chip, and needs to be performed only on a blank chip.

Once the initialisation is completed, the chip will work only if correctly connected to an oscillator: I strongly suggest to use the 6 pin header on the PCB to install the firmware.

## Fuses

If your chip has already a working copy of the firmware, you can skip this step. Otherwise, run:

```
avrdude -c usbasp -p atmega328p -B16 -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xFF:m -U lock:w:0xFF:m
```

## Firwmare

The second command will upload the firmware on the chip:

```
avrdude -c usbasp -p atmega328p -U flash:w:<hex file location>
```

## EEPROM

The third command will setup the EEPROM, where the chip stores presets. Upload of the firmware will reset this location of memory: the following command will restore default values.

```
avrdude -c usbasp -p atmega328p -U eeprom:w:loopy.eep
```

0 comments on commit 203d2e2

Please sign in to comment.