[Help] Dual Implementation of VUSB in ATmega32

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
tecoholic
Posts: 2
Joined: Fri Feb 25, 2011 6:58 am

[Help] Dual Implementation of VUSB in ATmega32

Post by tecoholic » Fri Feb 25, 2011 7:15 am

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.

_frank26080115

Re: [Help] Dual Implementation of VUSB in ATmega32

Post by _frank26080115 » Sat Feb 26, 2011 4:02 am

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.

tecoholic
Posts: 2
Joined: Fri Feb 25, 2011 6:58 am

Re: [Help] Dual Implementation of VUSB in ATmega32

Post by tecoholic » Sat Feb 26, 2011 7:38 am

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?

_frank26080115

Re: [Help] Dual Implementation of VUSB in ATmega32

Post by _frank26080115 » Mon Feb 28, 2011 8:52 am

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)

Post Reply