Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ATtiny fuse setting with an ISP (Read 10850 times)
Trek19
Junior Member
**
Offline


Posts: 91
Location: UK
Joined: Dec 2nd, 2013
ATtiny fuse setting with an ISP
Jun 2nd, 2014 at 11:44am
Print Post  
Some investigations I have conducted as a learning vehicle in an attempt to understand how things work, which I thought might be of interest.

I am using VisualMicro version 1.1404.01 with Atmel Studio 6 version 6.2.1153 & Arduino 1.5.6-r2
I have been experimenting with the Attiny84 using the cores found at:
https://code.google.com/p/arduino-tiny/downloads/detail?name=arduino-tiny-0150-0...
I upload my programmes using an Avrisp ISP and so don’t use a boot-loader.
I have modified the two board descriptions from the downloaded cores to suit my ISP:
attiny84at8.name=ATtiny84 @ 8 MHz
attiny84at1.name=ATtiny84 @ 1 MHz

To keep things simple I have adapted the blink programme which builds and uploads OK apart from the clock setting which does not get changed when I switch from the 8MHz to 1MHz device causing the LED to flash 8 times too fast because F_CPU is now 1000000. When I examine the CKDIV8 and other Fuse settings using “Tools-Device Programming” it is not programmed as per the above boards file.

I have examined the verbose output from a build and cant see where the fuses are set apart from at the start where what I think is preparation for a boot loader upload which I don’t use. 
The only uploading to the chip I can see is at the end of the verbose output where atprogram is used to upload the project hex file. Whilst I believe atprogram (with the correct settings) is capable of setting the fuses the hex file only contains programme code.

I also checked the verbose output when a different device/clock frequency (1 or 8 MHz) was chosen in the “Micro Boards” selection to see if the fuses were set at that stage, but they weren’t.

As the boot_loader settings seemed to be set-up I thought I would try “Tools – VM  - Burn Boot loader” but that produced the following:
System.Exception: Could not find tool arduino:avrdude

I can easily set the fuses using “Tools-Device Programming” but I think it would be better if done each time an upload is performed, perhaps checking to see if the fuses need changing. This way the same project could be used to programme several chips.

I am now trying to find a way of adding the correct lines to the process to programme the fuses but not sure where to look yet.
« Last Edit: Jun 2nd, 2014 at 4:15pm by Trek19 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ATtiny fuse setting with an ISP
Reply #1 - Jun 2nd, 2014 at 2:07pm
Print Post  
Hi Trek,
Please confirm the version of arduino you are using

Also switch on tools>options>visual micro>compiler>verbose then attempt upload

Please email the output to info[at]visualmicro.com

Thanks

  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ATtiny fuse setting with an ISP
Reply #2 - Jun 2nd, 2014 at 7:53pm
Print Post  
Hi,

I see you are using the new Atmel Studio Jungo system and not the standard Arduino usb.

In that case you will find the programmers.atmel.txt in below the [visual micro program files folder]\arduino 1.5.x\avr

Thanks
  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 91
Location: UK
Joined: Dec 2nd, 2013
Re: ATtiny fuse setting with an ISP
Reply #3 - Jun 3rd, 2014 at 2:55pm
Print Post  
OK Tim, I see the file, but how it is used and what to do with it are beyond my understing at the moment, thanks anyway.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ATtiny fuse setting with an ISP
Reply #4 - Jun 3rd, 2014 at 3:09pm
Print Post  
Hi, it uses the info provided via the boards.txt and programmers.txt

It might be an idea for you to switch back to standard atmel drivers so you can use the standard arduino programmers. These are currently better documented by the arduino community for what you are trying to do.

If you do want to switch to arduino drivers and use the standard arduino options then this article explains how to do that http://www.visualmicro.com/post/2014/01/17/AvrIsp-MkII-Usb-Driver-for-Arduino.as...

Thanks
  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 91
Location: UK
Joined: Dec 2nd, 2013
Re: ATtiny fuse setting with an ISP
Reply #5 - Jun 4th, 2014 at 6:06pm
Print Post  
OK Tim, I am a bit confused, I thought you had sorted out the jungo driver problems as this earlier post indicated.
http://www.visualmicro.com/forums/YaBB.pl?num=1391950011/8#8
Using an Arduino UNO, on my VS setup, using avrisp I can upload my programs OK, set the fuses using "Tools-Device programming" but I cant upload a bootloader in AS "Tools-VM-Upload Bootloader" or in the Arduino ide. Is this normal.
I read the details of how to change the USB drivers but further in the post above you will see I had no end of trouble with USB drivers which after many hours of unsuccessfully trying to resolve I did a clean windows install, so I am not keen to go back down that route. 
   
« Last Edit: Jun 5th, 2014 at 6:36am by Trek19 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ATtiny fuse setting with an ISP
Reply #6 - Jun 4th, 2014 at 6:42pm
Print Post  
I understand how you feel about your usb drivers. The can be frustrating!

The burn bootloader is not implemented using the atmel drivers yet but if it doesn't work in the arduino ide it probably isn't support.

The reasons for suggesting the arduino drivers is that I am struggling for time at the moment. The avrisp was tested with  an mkII and ice3 with a couple of standard arduino boards and I don't really know the fuse settings in the config files well enough to know if your tiny84's are any different.

Hopefully I will have more time over the future months but for now it's easier to say use the standard arduino way of doing things to answer questions. 

Arduino 1.5 is immensely configurable and the visual micro atmel extensions just extend the same system. This means that the descriptions on arduino.cc of the build process and configuration properties will explain how to ensure the right fuses are being set for your board by the arduino ide and/or visual micro.

ps: don't forget that tools>options>visual micro>compiler>verbose is very useful to see what is happening.
« Last Edit: Jun 4th, 2014 at 6:43pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint