Page 1 of 1

[Help] Dual Implementation of VUSB in ATmega32

Posted: Fri Feb 25, 2011 7:15 am
by tecoholic
Hi,

I am starting with a fresh ATmega32 micro-controller for my project. It is a sensor based project. In my project I will set a limit value through USB from the host and the AVR will return a value measured by the sensor whenever the limit value is exceeded, to the host system. Which implementation of VUSB should I choose?

Also I want to include a boot loader to the device, so I am thinking of including USBaspLoader to my project. I am having a USBasp based programmer for first time programming.

I went through the examples. All of them are showing implementation of any one use only. How can do both the boot loader and USB software?

I think the sequence is:
1.Program the USBaspLoader boot loader through USBasp based programmer
2.Connect the device to host
3.Use AVRDUDE to load the application (as USBaspLoader emulates a USBasp)
4.Reset and let the AVR to run the application to communicate via USB

I am not sure whether the sequence I have written is correct and will work as dual implementation. Kindly help me.

Re: [Help] Dual Implementation of VUSB in ATmega32

Posted: Sat Feb 26, 2011 4:02 am
by _frank26080115
Your steps are mostly correct, but the bootloader requires a way of activating, make sure you configure the jumper correctly, make sure you edit both configuration header files before compiling the bootloader.

Re: [Help] Dual Implementation of VUSB in ATmega32

Posted: Sat Feb 26, 2011 7:38 am
by tecoholic
What are the fuse values that I must set? Since its a new controller I am not sure how it will take the clock signal.

If I connect a 16 Mhz crystal and doesn't alter anything for the fuse values in USBaspLoader, will operate?

Re: [Help] Dual Implementation of VUSB in ATmega32

Posted: Mon Feb 28, 2011 8:52 am
by _frank26080115
tecoholic wrote:What are the fuse values that I must set? Since its a new controller I am not sure how it will take the clock signal.

If I connect a 16 Mhz crystal and doesn't alter anything for the fuse values in USBaspLoader, will operate?


fuse bits: http://frank.circleofcurrent.com/fuseca ... LOCKBIT=FF

You need to recompile USBaspLoader with F_CPU set to 16000000

You only need to change fuses when you between clock types (high speed crystal, low speed crystal, external, internal), not speed (unless you change between high and low speed crystals)