Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Adjustment of the SUT and CKSEL fuse bits

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1198
Location: France

france.gif
PostPosted: Thu Aug 20, 2020 3:21 pm    Post subject: Adjustment of the SUT and CKSEL fuse bits Reply with quote

Hi all
They are named KLA987 in the programmer menu with a lot of choice



We have 6 digit to adjust


I take the datasheet of the M328

I take an arduino uno to check is original setting
=111111

datasheet said :
CKSEL +111 for low power crystal higt speed (16MHz)
BUT FOR BOD enable the SUT must be 10 and CKSEL0 =0



so for my Arduino uno the setting would be 111010 if KLA987 = CKSEL 3210 +STU 21 = 1110 10

It is right or not ?

:cry:

(BASCOM-AVR version : 2.0.8.3 )

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 1136

poland.gif
PostPosted: Thu Aug 20, 2020 5:48 pm    Post subject: Reply with quote

Before I begin. On my modest website that I dont have time to frequently update I collect some "calculators" for FuseBits.
Link to first calculator ->LINK
Link to the second calculator ->LINK

First of all you may need knowledge why is that a lot of options for clock.
It is because of needs and power supply.
If you have low important/demanding application with lazy power supply that rise voltage and current slowly then you should set maximum Start-up time

For example every external crystal attached above 8MHz -> Ect.Crystal Osc.;Freq 8.0- MHz;Start-up time :16K CK/14CK +65ms; [CKSEL=1111 SUT=11]

But when you must immediatelly take control over something powered up (think for example about automotive) then you should care of good power supply first and then you can shorting the time for uC to boot.

It is always good to set BODEN with choosen voltage value. It will hold uC in the reset state until voltage will guarante proper working conditions for it.

Some of the previous uC`s have CKOPT FuseBit. This should be checked if you attach crystal with freq above 8MHz. This is for "full swing" signal.
I saw this on my oscilloscope. Without it enabled clock signal is ~2,5V PkPk. When enabled - nearly rail to rail.

One may note that some uC`s have FuseBit CKDIV8 that ClockDivideBy8 and this is ALWAYS true. So even when someone switch into some external crystal/internal osc will divide your uC clock by 8. Then remember that programming clock cannot be faster than 1/4 of uC clock. So sometimes (if you haven't been warned Very Happy ) you can lost a connection with the uC when your setting for programmer clock is higher than 1/4 of uC clock.

Also please always remember to disable JTAG on the new chip if it is equipped with and you don`t use it because it takeover controll with its dedicated pins.
Examples are Mega16, Mega32 ..

Realy odd uC is a Mega128. From stock/shipped you get enabled, by manufacture, FuseBit "M103C" Atmega103 Compatibility Mode.
You want to disable this for shure. Second thing odd in this uC is that SPI dont share same pins of ISP... but this is not the FuseBits topic.

So ... I dont know why Bascom dont allow (maybe) direct input and interpreting Fuses.
This can be handy for example-> I type "BF" for Low fuse and "DD" for High "FF" for Extended.
It should set JTAG=OFF, BODEN on 2.7V, M103C=OFF, Crystal above 8MHz
Back to top
View user's profile Visit poster's website
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1198
Location: France

france.gif
PostPosted: Thu Aug 20, 2020 6:20 pm    Post subject: Reply with quote

Applause Applause Applause Dancing Dancing Dancing

Thank you very much for resolving 25 years of questions
JP Wink

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum