ATtiny1614 OTA bootloader

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hello everyone, it's my first post! 

 

I've been having fun with a little project to control a bunch of LED strips using ATtiny1614s and nRF24L01+ radios and just wanted to share the OTA bootloader I've been tinkering with here in case anybody else finds it useful or has any feedback. https://github.com/mattshepcar/megaTinyRF24Boot

 

I'm really enjoying messing with these new mega tiny AVRs, especially getting back to some assembly coding.  I've been using an xplained nano 416 for debugging over UPDI which is really great but it only seems to work in MPLAB X and not Atmel Studio, dunno if anybody else has had that problem?  I'd much rather be using Visual Studio!

 

Anyway, hello from yorkshire, I think I'm an avr freak. :O

 

cheers

Matt

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Glad you are enjoying the attiny1614, I like that chip because it's easy to hand-solder but not too big.

 

Hmm, I have a xplained nano 416 and it worked fine with Atmel studio last year (haven't used it recently) - perhaps a Windows update has broken it? Anyway I've been using the pyupdi.py programmer (+ a resistor to connect the tx line) with my own toolchain - although it uses the same compiler and libraries underneath so all the examples work.

 

Just getting started with avr assembly, seems pretty straightforward, I'm using the gnu assembler syntax so I can use the normal header files and link with C code - I'm not going to write my main() function in asm, only a few critical subroutines (bitbang SPI for the win!).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, I've been using UPDI for programming most of the time.  I guess using optiboot_x is useful if you want to use the UPDI pin for something else.  I didn't have any luck using a resistor connected to TX though, I had to use a diode as per  https://github.com/dword1511/onewire-over-uart (I didn't need the pull up resistor though as I think the tiny already pulls UPDI up internally).  No wires is even better if you have a radio though :)

 

I tried avrasm but gnu assembler is definitely the way to go so you can include all the header files as you say.  The AVR instruction set has a few quirks but it's quite fun and you can definitely write much tighter code than the C compiler generates! 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you can get the OTA updates working reliably, yes, it's ideal for development. Especially if your microcontroller is inaccessible inside a robot.

 

I've not done that, but I am using the really terrible* A7105 radio chip

 

* Actually, its radio is probably really good, but its documentation is terrible