Skip to content

Add ATtiny13a support #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Adding a custom chip definition to the ATmega2560 example
  • Loading branch information
aaronaverill committed Aug 20, 2019
commit 070b364f97bbe4822daffcfcf24af24f363f6fc5
16 changes: 13 additions & 3 deletions examples/avrprog_program_mega2560.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Arduino Mega 2560 programming example, be sure you have the Mega/2560 wired up so:
Mega Ground to CircuitPython GND
Mega 5V to CircuitPythong USB or make sure the Trinket is powered by USB
Mega 5V to CircuitPython USB or make sure the Trinket is powered by USB
Pin 52 -> CircuitPython SCK
Pin 50 -> CircuitPython MISO - Note this is backwards from what you expect
Pin 51 -> CircuitPython MOSI - Note this is backwards from what you expect
Expand All @@ -17,8 +17,18 @@
avrprog = adafruit_avrprog.AVRprog()
avrprog.init(spi, board.D5)

# Each chip has to have a definition so the script knows how to find it
atmega2560 = avrprog.Boards.ATmega2560
# To program a chip, you'll need to find out the signature, size of the flash,
# flash-page size and fuse mask. You can find this in the datasheet or in
# avrdude.conf located at:
# http://svn.savannah.nongnu.org/viewvc/*checkout*/avrdude/trunk/avrdude/avrdude.conf.in
# You can also use the predefined values in AVRprog.Boards
atmega2560 = {
'name': "ATmega2560",
'sig': [0x1E, 0x98, 0x01],
'flash_size': 262144,
'page_size': 256,
'fuse_mask': (0xFF, 0xFF, 0x07, 0x3F)
}

def error(err):
""" Helper to print out errors for us and then halt """
Expand Down