Specifying lock bits (or not) with the ATTiny416/816/817/1617

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

I see the new ATTiny416/816/817/1617 diverges somewhat from the older ATtiny and ATmega devices. I like to put the fuse, lock bits and device signature in my code so I can simply use the ELF file to program and not worry about settings.  The code I used for the signature still works and I found this post:

 

     https://www.avrfreaks.net/forum/specifying-fuses-or-not-attiny4168168171617?skey=attiny817%20fuse

 

for handling the fuses.  Is there a simply method for the lock bits?  It is not entirely clear in the datasheet on the lock bits.  There is no FUSE.LOCKBIT in Atmel Studio 7.0 (1931 build) as described in the datasheet and it doesn't look like the same format as the older devices.

 

Any advice?

This topic has a solution.
Last Edited: Wed. Dec 5, 2018 - 01:21 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

You want the libc lock.h: https://www.microchip.com/webdoc/GUID-90493D45-DB42-4BB8-9627-BAA0225A71E3/GUID-7E388051-1611-4745-9EBA-DF93AF912B74.html
.
The FUSE.LOCKBIT is the 'normal' module description (from the Io header).

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

That was the way I originally set lock bits.  I just re-tried and it compiled.  Thanks for stating the obvious!