a timer that goes logic high or low every 15mins ( using tiny85 chip)

Thread Starter

timtim1234

Joined Nov 30, 2023
246
You are talking about a "read lock" and not a write lock??

Hum mm I think I found it??

Datasheet info:
Bit 3 – RFLB: Read Fuse and Lock Bits

if so, I am still trying to figure it out :)
 
Last edited:

LesJones

Joined Jan 8, 2017
4,511
You would normally change the lock byte fuse. If you did the only way to clear them is a chip erase. (So they have still prevented you from reading the code (ie copy protected software.) as the code has now been erased)
See this web page for information on the function of fuse bits.
http://eleccelerator.com/fusecalc/fusecalc.php?chip=attiny85
If you do change a fuse bit which prevents normal brogramming this web page tells you how to solve the problem.
https://sites.google.com/site/wayneholder/attiny-fuse-reset
Note programming the chip with the boot loader DOES change some high and low byte fuse bits but these do not prevent you from programming the chip. (I found out after programing the chip with the boot loader before programming it using avrdude to program it with the .hex file I sent to you. I think it had changed the CKDIV8 bit.)

Les.
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
You would normally change the lock byte fuse. If you did the only way to clear them is a chip erase. (So they have still prevented you from reading the code (ie copy protected software.) as the code has now been erased)
See this web page for information on the function of fuse bits.
http://eleccelerator.com/fusecalc/fusecalc.php?chip=attiny85
If you do change a fuse bit which prevents normal brogramming this web page tells you how to solve the problem.
https://sites.google.com/site/wayneholder/attiny-fuse-reset
Note programming the chip with the boot loader DOES change some high and low byte fuse bits but these do not prevent you from programming the chip. (I found out after programing the chip with the boot loader before programming it using avrdude to program it with the .hex file I sent to you. I think it had changed the CKDIV8 bit.)

Les.
ok if i am reading this right ( and understanding this right) the link you posted the LOCKBIT bit 1 and bit o need to be checked? if so this would be the avrdude command line for this:
-c arduino -p t85 -P COM6 -b 19200 -U lock:w:0xFC:m

once this is done then a HVP has to be used to put it back using the hex file you sent?
 

LesJones

Joined Jan 8, 2017
4,511
I have just re read my post #183 and noticed that I had left out the word not in the first sentance. It should read " You would not normally change the lock byte fuse." So this has probably confused you. The fuse bits seem to use reverse logic. When thy are set to a 1 it means unprogrammed. See table 20-1 on page 147 of the datasheet. Just below this table it says
" Note: 1. “1” means unprogrammed, “0” means programmed"
On the AVR fuse calculator. you will notice the bits unchecked . For example The low byte has the boxs for bits 1,5,7 unticked which means they are set to a 1. This is the value 0x62 shown below bit 0. None of the lock bit boxs are ticked so the value is 0xFF.
I have not been able to get the arduino programmer to work with avrdudess as it replaces the modified version of avrdude.conf with the unmodified version every time it runs.. This does not happen with avrdude which works with the arduino programmer using the modified arduino.conf file. At the moment using the command line version of avrdude seems to the only way for you to program the .hex file into the ATtiny85. NOTE In the post where I told you about modifying the avrdude.conf file I forgot to tell you that you have to run the editing program that you use in administrator mode to be allowed to modify the file. Also if you have previously programmed the chip with the boot loader it will run faster than it should because the boot loader has changed bits in the low and high fuse bytes.

Les.
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
I have just re read my post #183 and noticed that I had left out the word not in the first sentance. It should read " You would not normally change the lock byte fuse." So this has probably confused you. The fuse bits seem to use reverse logic. When thy are set to a 1 it means unprogrammed. See table 20-1 on page 147 of the datasheet. Just below this table it says
" Note: 1. “1” means unprogrammed, “0” means programmed"
On the AVR fuse calculator. you will notice the bits unchecked . For example The low byte has the boxs for bits 1,5,7 unticked which means they are set to a 1. This is the value 0x62 shown below bit 0. None of the lock bit boxs are ticked so the value is 0xFF.
I have not been able to get the arduino programmer to work with avrdudess as it replaces the modified version of avrdude.conf with the unmodified version every time it runs.. This does not happen with avrdude which works with the arduino programmer using the modified arduino.conf file. At the moment using the command line version of avrdude seems to the only way for you to program the .hex file into the ATtiny85. NOTE In the post where I told you about modifying the avrdude.conf file I forgot to tell you that you have to run the editing program that you use in administrator mode to be allowed to modify the file. Also if you have previously programmed the chip with the boot loader it will run faster than it should because the boot loader has changed bits in the low and high fuse bytes.

Les.

ohhh hummm i am more confused now..lol so if you would please tell me how do I make the tiny85 not be readable? What command and setups are need? and yes i do have the bootloader already on the chip so it will run faster, like how much faster any idea?

Also, I think I have the avrdudess working with Arduino programmer i have NOT tried to program a chip but I think the read is working:

>>>: avrdude.exe
Loaded 145 programmers and 347 MCUs
Reading fuses...
>>>: avrdude.exe -c arduino -p t85 -P COM6 -b 19200 -U hfuse:r:-:h -U lfuse:r:-:h -U efuse:r:-:h
SUCCESS: Read high fuse
SUCCESS: Read low fuse
SUCCESS: Read extended fuse
Reading lock bits...
>>>: avrdude.exe -c arduino -p t85 -P COM6 -b 19200 -U lock:r:-:h
SUCCESS: Read lock bits
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
If you program your top secret code in and set the the read lock bit you can’t change your secret code
so its just a write protect and not a read protect too? Can you just please give me a straight answer and not hints, etc and how to do it if It's possible or not..thanks
:)
 
Last edited:

be80be

Joined Jul 5, 2008
2,395
Learn by trying I’ve messed them up before and then had to erase my top secret code and set them back with high voltage programmer
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
Learn by trying I’ve messed them up before and then had to erase my top secret code and set them back with high voltage programmer

yes that is what the other person said to had to "clear/ease" it to be able to read and write it. do recall what setting they are :)
 

be80be

Joined Jul 5, 2008
2,395
FF = PI > S.E.T

Well i fixed my cheap usbasp programmer they set the name i guess so they could say it was there firmware wrong so avrdude wouldnt use it

Let me tell you the easy way to load a hex you make a folder where you can find it copy the arduino avedude to it and the avrdude.conf files
then its smiple to load a hex

open a terminal type ./avrdude -C ./avrdude.conf -p m8 -c avrisp -P /dev/ttyACM1 -b 19200 -U flash:w:usbasp.atmega8.2011-05-28.hex
change what programmer and what HEX you using

Make sure there all 3 in the folder your hex copy of avrdude and avrdude.conf
and its done deal
 
Last edited:

Thread Starter

timtim1234

Joined Nov 30, 2023
246
FF = PI > S.E.T

Well i fixed my cheap usbasp programmer they set the name i guess so they could say it was there firmware wrong so avrdude wouldnt use it

Let me tell you the easy way to load a hex you make a folder where you can find it copy the arduino avedude to it and the avrdude.conf files
then its smiple to load a hex

open a terminal type ./avrdude -C ./avrdude.conf -p m8 -c avrisp -P /dev/ttyACM1 -b 19200 -U flash:w:usbasp.atmega8.2011-05-28.hex
change what programmer and what HEX you using

Make sure there all 3 in the folder your hex copy of avrdude and avrdude.conf
and its done deal
Are you on a Linux machine? Because of this---->/dev/tty

sorry i am not sure what you mean by FF = PI > S.E.T? <-----this so the chip can't be read??
 

be80be

Joined Jul 5, 2008
2,395
yes linux all the way
sorry i am not sure what you mean by FF = PI > S.E.T? <-----this so the chip can't be read??
thats what they say
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
Yes that it
ok ohhh and i will need a HVP ( the one you posted) to TRY to fix chip but i can program the fuses with my uno?

or looks like the avrdudess program has fuse setting too? so may be easier using that the comand lines?
 
Last edited:

Thread Starter

timtim1234

Joined Nov 30, 2023
246
hummm interesting that the avrdudess program does NOT come up with the same hex values that web page shows unless I am missing something? it don't seem to have the same options

screen shot :
 

Attachments

Thread Starter

timtim1234

Joined Nov 30, 2023
246
You can set them in code hard way or with the avrdudess
I the ide you have to make changes to the board.text
You added stuff
Ok, but it seems that the web page link you posted has different hex values than avrdudess? and it looks like some of the options are not in avrdudness? so i am not sure what to think about that.

I the ide you have to make changes to the board.text <--- sorry i am not sure what you are trying to say there?
 
Top