Search found 1013 matches

by christian
Mon Apr 21, 2008 6:55 pm
Forum: V-USB
Topic: AVR-USB frequency meter
Replies: 16
Views: 18181

You could connect your input signal to T0 AND to ICP. If the input frequency is below 3 kHz, use ICP for high resolution, if it's above 3 kHz, count pulses. This is not straight forward to implement and has problems if the input frequency changes, but it's the only idea I have which does not require...
by christian
Mon Apr 21, 2008 12:49 pm
Forum: V-USB
Topic: AVR-USB frequency meter
Replies: 16
Views: 18181

With the input capture unit, use pin ICP1. It captures the value of timer 1 when it triggers and generates an interrupt.
by christian
Mon Apr 21, 2008 10:46 am
Forum: V-USB
Topic: working nicely on my laptop, but fail on my PC?
Replies: 32
Views: 34667

OK. This explains the behavior. But it does not explain why a message is duplicated. We can fix the symptom by checking data toggling, but I'd very much prefer to find the cause for the duplicate. You mentioned that there were data errors in the duplicates. What's the structure of these errors? Bit ...
by christian
Mon Apr 21, 2008 10:39 am
Forum: V-USB
Topic: AVR_USB timing out?
Replies: 18
Views: 36547

3.3 V Zener diodes are not a very good idea. Can you please measure the voltage level on D-? Is it well above 2.5 V?
by christian
Mon Apr 21, 2008 10:29 am
Forum: V-USB
Topic: Mass storage, or what are good alternatives?
Replies: 16
Views: 15780

Thanks!

So the challenge is open: Can anybody come up with a device (whatever it is) based on the mass storage class?
by christian
Fri Apr 18, 2008 8:53 pm
Forum: V-USB
Topic: First key is not sent (hid keyboard)
Replies: 11
Views: 15357

Although the main loop looks a bit weird, it should work. Maybe the host side driver does not accept keystrokes shortly after the device was connected (just a wild guess). Did you try to add a delay before sending the first keystroke, e.g. iterate the main loop for one second before you send the fir...
by christian
Fri Apr 18, 2008 3:27 pm
Forum: V-USB
Topic: working nicely on my laptop, but fail on my PC?
Replies: 32
Views: 34667

Where exactly do you store lastTok in the assembler code? Do you store it even if the request is answered with NAK? This would explain it: Data is only stored if we answer with ACK, but lastTok may change if a packet has been rejected meanwhile.
by christian
Fri Apr 18, 2008 3:24 pm
Forum: V-USB
Topic: First key is not sent (hid keyboard)
Replies: 11
Views: 15357

Do you check whether the interrupt buffer is free with usbInterruptIsReady() before you use usbSetInterrupt()? If not, this is probably the cause of the problem. See EasyLogger for details.
by christian
Fri Apr 18, 2008 1:37 pm
Forum: V-USB
Topic: Using Hidkeys with internal RC oscillator? (on atmega8L?)
Replies: 5
Views: 5418

You can try tuning the RC oscillator to 12 MHz. I had success on a test board. But the spec says that it should not work reliably. See the EasyLogger example. Copy the oscillator calibration from there and set F_CPU to 12 MHz. The oscillator should then be calibrated to 12 MHz. If it works, you can ...
by christian
Fri Apr 18, 2008 1:35 pm
Forum: V-USB
Topic: First key is not sent (hid keyboard)
Replies: 11
Views: 15357

Interesting. I have tried both with EasyLogger. If I set USB_INITIAL_DATATOKEN to USBPID_DATA1, then it works as expected. If I set it to USBPID_DATA0, the first keystroke is missing.

Have you checked your firmware whether it generates the keystrokes correctly?
by christian
Thu Apr 17, 2008 2:47 pm
Forum: V-USB
Topic: Using Hidkeys with internal RC oscillator? (on atmega8L?)
Replies: 5
Views: 5418

You need exactly one of the supported values which are 12, 15, 16 and 16.5. A module for 20 MHz is planned, but not yet available.
by christian
Thu Apr 17, 2008 12:30 pm
Forum: V-USB
Topic: working nicely on my laptop, but fail on my PC?
Replies: 32
Views: 34667

Can you please post (or mail me) the EEPROM content (previous and current package) and add a note where see an error?

Another question: Do you use other interrupts than the USB interrupt or do you disable interrupts in your main code?
by christian
Thu Apr 17, 2008 9:30 am
Forum: V-USB
Topic: Using Hidkeys with internal RC oscillator? (on atmega8L?)
Replies: 5
Views: 5418

Can you get 15 or 16 MHz? The Mega8 has no 16 MHz RC oscillator option. You may have success with calibrating the RC oscillator to 12 MHz, but that's not reliable.
by christian
Thu Apr 17, 2008 9:25 am
Forum: V-USB
Topic: Mass storage, or what are good alternatives?
Replies: 16
Views: 15780

If you give up the project, can you please post the code somewhere (e.g. in our wiki) and add a link here in the forum? Maybe others are interested.
by christian
Thu Apr 17, 2008 9:22 am
Forum: V-USB
Topic: Porting BootloadHID to mega64 BOOTLOADER_ADDRESS ??
Replies: 8
Views: 9589

8k flash size minus 2k boot loader = 6k, or in hex 1800.