Search found 68 matches

by iphi
Mon Feb 11, 2008 9:12 pm
Forum: V-USB
Topic: enumeration detect for AVR?
Replies: 5
Views: 4846

enumeration detect for AVR?

Hi, is there a function within the AVR firmware which allows the main loop to find out if enumeration was successful? I'm still thinking about some possibility to do a self calibration of the RC oscillator. One slow but working solution would be to modify OSCCAL until enumeration is successful, then...
by iphi
Sun Feb 10, 2008 11:42 pm
Forum: V-USB
Topic: occasional transmission errors with 16.5MHz RC oscillator
Replies: 17
Views: 11906

Regarding OSCCAL and watchdog: As far as I understand the data sheet, any RESET (including watchdog) restores the factory OSCCAL value. But I may be wrong with this assumption. You are correct. Now that my watchdog works I could test. OSCCAL is restored to factory values for any reset. Regards, Tho...
by iphi
Sat Feb 09, 2008 10:01 pm
Forum: V-USB
Topic: Watchdog reset doesn't work properly
Replies: 9
Views: 10582

I can fonfirm that the above was the reason for my watchdog problems. After having added the following piece of code suggested in AVR-libc my watchdog reset works perfectly. #include <stdint.h> #include <avr/wdt.h> uint8_t mcusr_mirror _attribute_ ((section (".noinit"))...
by iphi
Sat Feb 09, 2008 7:10 pm
Forum: V-USB
Topic: Watchdog reset doesn't work properly
Replies: 9
Views: 10582

Hi Grendel, thanks for your proposal. I'll try that. All, I think I have found the reason for the strange behavior of my ATTINY45 compared to the ATMEGA8: The watchdog remains on even after watchdog reset, thus the system won't stay in the 0.5 second delay loop. This is described in the AVR-libc doc...
by iphi
Fri Feb 08, 2008 11:40 pm
Forum: V-USB
Topic: Watchdog reset doesn't work properly
Replies: 9
Views: 10582

Hi Christian, my confusion is growing. I have made the following experiments: 1. Done the modification you suggested with the global variable and suppressing the wdtreset in the main loop. => doesn't work, same as my first attempt 2. Tried a hardware reset on pin 1 instead: a) An initial hardware re...
by iphi
Fri Feb 08, 2008 8:40 pm
Forum: V-USB
Topic: Watchdog reset doesn't work properly
Replies: 9
Views: 10582

BTW: 1400000 is an integer constant, it would be 1400000L otherwise. Do you get a compiler warning for this? No, there's no compiler warning. As I'm a C beginner I'm quite paranoic to avoid any compiler warnings as I have learned that C warnings are serious in contrast to Pascal warnings. My code c...
by iphi
Fri Feb 08, 2008 7:42 pm
Forum: V-USB
Topic: Watchdog reset doesn't work properly
Replies: 9
Views: 10582

You force a RESET in the middle of a USB command. This may confuse the host. It would be cleaner to set a global variable so that the main loop does not call wdt_reset(), but still calls usbPoll() until the reset occurs. Good point. But why is it working every time without fault on a crystal driven...
by iphi
Fri Feb 08, 2008 8:26 am
Forum: V-USB
Topic: Watchdog reset doesn't work properly
Replies: 9
Views: 10582

Watchdog reset doesn't work properly

Hello, I have AVRUSB running on ATTINY45 with RC oscillator on 16.5MHz. I have coded such that I can reset the device via Watchdog timer like this: USB_PUBLIC uchar usbFunctionSetup(uchar data[8]) { usbRequest_t *rq = (void *)data; ... if(rq->bRequest == 0xf){ // Re...
by iphi
Thu Feb 07, 2008 2:57 pm
Forum: V-USB
Topic: occasional transmission errors with 16.5MHz RC oscillator
Replies: 17
Views: 11906

Hi Christian, one more thing: In the Easylogger example, the watchdog timer is quite useless if the EEPROM doesn't contain an initial calibration value if my understanding is correct: If the watchdog fires and the program restarts, the clock oscillator will be tuned away again from the already detun...
by iphi
Thu Feb 07, 2008 2:05 pm
Forum: V-USB
Topic: occasional transmission errors with 16.5MHz RC oscillator
Replies: 17
Views: 11906

Hi Christian, you were correct. The problem is caused by an oscillator frequency offset. I have made the following experiment: I have added some code so I could read and modify OSCCAL via USB. After program startup I read a value of 0x5d. Next I changed it until USB connection failed. USB connection...
by iphi
Wed Feb 06, 2008 3:45 pm
Forum: V-USB
Topic: occasional transmission errors with 16.5MHz RC oscillator
Replies: 17
Views: 11906

Hi Christian, thanks for your quick reply. This may well be. I don't use a stabilized supply voltage so far. Question: Easylogger firmware searches a calibration value in the EEPROM at startup. How does it get there? Will the driver modify a calibration from the USB timing results? Is this PLL pure ...
by iphi
Wed Feb 06, 2008 11:41 am
Forum: V-USB
Topic: occasional transmission errors with 16.5MHz RC oscillator
Replies: 17
Views: 11906

occasional transmission errors with 16.5MHz RC oscillator

Hello, I have implemented a little USB device on an ATTINY45 based on the 16.5MHz driver found in the EasyLogger project. Basically it's working but I do occasionally experience transmission errors, e.g. the Product string or Manufacturer string cannot be read once in a while. Any ideas or suggestio...
by iphi
Mon Jan 14, 2008 3:36 pm
Forum: V-USB
Topic: powerswitch & delphi
Replies: 4
Views: 4912

Hi,

I have a running AVR-USB Delphi-example on my webpage, see

http://www.mydarc.de/dg8saq/

Tom
by iphi
Sat Sep 08, 2007 2:00 pm
Forum: V-USB
Topic: Anfänger Frage zur Erstkompilation mit WinAVR - Fehlermeldun
Replies: 1
Views: 3547

Hallo, lade Dir mal meine Anwendung von hier m (ganz unten auf der Seite: Download Software) herunter, packe aus dem zip-File das firmware-Verzeichnis aus und doppelklicke im Firmwareverzeichnis auf die Datei DDS.aps . Danach sollte AVR-Studio automatisch das Projekt mit den korrekten Optionen laden...
by iphi
Sun Jul 29, 2007 6:46 am
Forum: V-USB
Topic: PowerSwitch disconnects
Replies: 8
Views: 7248

Could it be a brown-out reset steming from a glitch on the power supply?