Search found 1013 matches

by christian
Wed Aug 15, 2007 8:34 pm
Forum: V-USB
Topic: Problems with ATMega88
Replies: 12
Views: 13275

The test program does not use the timer: You never clear TOV0 in TIFR0 by writing 1 to it. The loop therefore runs at maximum speed. Otherwise it should output something like 22.888 Hz. Having 12 MHz on CLKO should prove that the clock is correct, though. Then we have the remaining questions: Have y...
by christian
Wed Aug 15, 2007 8:25 pm
Forum: V-USB
Topic: AVR-Doper HID mode problem
Replies: 10
Views: 32308

OK, the transistors MAY be a substitute. I don't want to take the time to think it through thoroughly. I took quite a bit of time to think through all cases (target voltage higher or lower than programmer) with the HC126. The simple version without level converters would be a compile time firmware o...
by christian
Tue Aug 14, 2007 8:16 pm
Forum: V-USB
Topic: AVR-Doper HID mode problem
Replies: 10
Views: 32308

Yes, you are right with this computation. I can't remember exactly why I did it this way, maybe because I was working with capacitive sensors before that and wanted to re-use the principle. The transistors are probably not a good substitute for level conversion. We should come up with a low-cost ver...
by christian
Tue Aug 14, 2007 7:38 pm
Forum: V-USB
Topic: AVR-Doper HID mode problem
Replies: 10
Views: 32308

The idea behind this code is to use the port pin for dual purposes. The HID jumper has a series resistor in order to prevent disturbing the normal port function. Since it's not guaranteed that the pull-down with 1k series resistor reads reliably low, we measure the discharge of the pin's capacity. W...
by christian
Mon Aug 13, 2007 2:28 pm
Forum: V-USB
Topic: Problems with ATMega88
Replies: 12
Views: 13275

Can you make a simple test program which outputs a given frequency on a port pin and measure the frequency to make sure the clock rate is OK?

And are you sure you have initialized D+ and D- as input pins?

And, finally, if you enable debug level 2, can you capure the serial output?
by christian
Mon Aug 13, 2007 1:02 pm
Forum: V-USB
Topic: Problems with ATMega88
Replies: 12
Views: 13275

If you had to change USB_INTR_CFG and related defines in order to compile, something must be broken. usbdrv.h contains #ifdefs to detect the set of defines to be used. It should choose EICRA etc. automatically. Your fuse low byte has bit 7 (CKDIV8) clear, this means that the MCU divides the clock by...
by christian
Mon Aug 13, 2007 12:50 pm
Forum: V-USB
Topic: AVR USB device not recognized
Replies: 3
Views: 6393

The debug log shows that the host sends a request and the device answers, but the host does not recognize the answer and retries the request several times until it decides to issue another reset and start from scratch. I have not decoded the host request to see whether it makes sense. But if the clo...
by christian
Mon Aug 13, 2007 12:32 pm
Forum: V-USB
Topic: usbasp and an Intel Mac w/ OS X (device not recognized)
Replies: 10
Views: 14046

No, none that I know of. Have you tried a USB 2.0 hub between the host and the device? If that works, it's very likely an electrical problem.
by christian
Wed Aug 08, 2007 5:31 pm
Forum: V-USB
Topic: AVR-CDC Problems
Replies: 8
Views: 9244

If the device enumerates and is recognized by your operating system, then AVR-USB is functional. If the pipes stall or serial I/O does not work, that's a problem of the firmware application using AVR-USB, not of the driver itself. I know that the AVR-CDC application takes the driver to its limits an...
by christian
Wed Aug 08, 2007 5:10 pm
Forum: V-USB
Topic: AVR-CDC Problems
Replies: 8
Views: 9244

Yes, it uses AVR-USB, but it can't meet the requirements entirely for various reasons. If you want a reliable CDC device, it's best to use a microcontroller with full speed USB hardware built-in.
by christian
Wed Aug 08, 2007 4:41 pm
Forum: V-USB
Topic: AVR-CDC Problems
Replies: 8
Views: 9244

I suspect that the bulk endpoints for data I/O have stalled. This it one of the potential problems if the interrupts are disabled for too long (which they sometimes are in AVR-CDC). Whether the problem occurs, depends on your operating system, host hardware and other more or less random factors.
by christian
Wed Aug 08, 2007 4:14 pm
Forum: V-USB
Topic: AVR-CDC Problems
Replies: 8
Views: 9244

Are you sure that you used a binary for the Mega88? Please note that the Mega8 and Mega88 are not binary compatible. You need a hex file specifically compiled for the Mega88. The problem with AVR-CDC is that it is not completely USB standards conformant. It works with (at least) Windows and Mac OS X.
by christian
Wed Aug 08, 2007 4:07 pm
Forum: V-USB
Topic: usbasp and an Intel Mac w/ OS X (device not recognized)
Replies: 10
Views: 14046

AVR-USB devices work well on my MacBook Pro / Intel, even without zener diodes in D+ and D-.

If you have omitted the zener diodes, please try adding them. Some host controllers don't tolerate 5 V levels, although many hosts do tolerate them.
by christian
Thu Aug 02, 2007 4:22 pm
Forum: V-USB
Topic: How to add endpoints ?
Replies: 6
Views: 7629

Correcting myself: You might be able to share endpoints even if all functions run simultaneously. You can probably use endpoint 0 for all three functions because the function can be distinguished by the request. You can also probably share the interrupt endpoint because CDC does not really require i...
by christian
Thu Aug 02, 2007 4:20 pm
Forum: V-USB
Topic: How to add endpoints ?
Replies: 6
Views: 7629

I don't think so, because you need separate endpoints for each function in the composite device.

You can share endpoints if the various functions are mutually exclusive and you choose one of them with a configuration value. But that's probably not what you want.