Search found 44 matches

by cpldcpu
Sun Dec 08, 2013 1:05 pm
Forum: V-USB
Topic: Clock accuracy limits for 12MHz implementation
Replies: 7
Views: 9186

Re: Clock accuracy limits for 12MHz implementation

Amazingly it also works with the 16Mhz version, when tuning the internal RC oscillator from 8Mhz to 16MHz. No CRC errors. The reasons for this could be the new RC-oscillator revision in the ATtiny841. They are temperature compensated and have a single range calibration value, meaning that they can b...
by cpldcpu
Sun Dec 08, 2013 10:07 am
Forum: V-USB
Topic: Clock accuracy limits for 12MHz implementation
Replies: 7
Views: 9186

Re: Clock accuracy limits for 12MHz implementation

Nice idea, that should double the period until a first bit error can occur. Actually it should not be a problem to free additional registers. Since the first bits of the sync code are repeated it does not matter if you miss one or two bits. The extry time could be used to push more registers. The si...
by cpldcpu
Sat Dec 07, 2013 11:55 pm
Forum: V-USB
Topic: Clock accuracy limits for 12MHz implementation
Replies: 7
Views: 9186

Clock accuracy limits for 12MHz implementation

The documentation states that the 12MHz version needs a quartz oscillator and only the 12.8MHz version will allow a timing deviation of +-1%. What is the accuracy requirement for the 12MHz version? I tested both on the ATtiny841, which has Atmels newest generation RC oscillator, and it seems that ev...
by cpldcpu
Sun Dec 01, 2013 9:11 am
Forum: V-USB
Topic: Entirely polled V-USB? [yes, it works!]
Replies: 18
Views: 20356

Re: Entirely polled V-USB? [yes, it works!]

I moved that to the beginning of the interrupt routine to ensure that YL is initialized as well.
by cpldcpu
Sun Dec 01, 2013 2:09 am
Forum: V-USB
Topic: Entirely polled V-USB? [yes, it works!]
Replies: 18
Views: 20356

Re: Entirely polled V-USB? [yes, it works!]

meh... just tried it on another machine and it failed all the time. Looks like the only solution is to introduce a more sophisticated algorithm that decides when to do the housekeeping.
by cpldcpu
Sun Dec 01, 2013 1:53 am
Forum: V-USB
Topic: Entirely polled V-USB? [yes, it works!]
Replies: 18
Views: 20356

Re: Entirely polled V-USB? [yes, it works!]

I made a version of micronucleus only using polling, based on your work above. You can find the branch here: m Getting the polling to work with larger datatransfers as well was not easy. Finding the right timing to call usbPoll() in between transmissions was quite difficult. I had no luck with a blo...
by cpldcpu
Sat Nov 30, 2013 10:47 am
Forum: V-USB
Topic: Entirely polled V-USB? [yes, it works!]
Replies: 18
Views: 20356

Re: Entirely polled V-USB? [yes, it works!]

Yes, yes and yes :)

My guess is also on status register restoring, but I reviewed the diassembly and found nothing fishy. Looks like I have to dig further.
by cpldcpu
Fri Nov 29, 2013 8:31 pm
Forum: V-USB
Topic: Entirely polled V-USB? [yes, it works!]
Replies: 18
Views: 20356

Re: Entirely polled V-USB? [yes, it works!]

Ok, managed to get it working is well. 1) I did not realize your routine was jumping to INT0 and my code used the pin change interrupt PCINT0. One of the most annoying bugs ever! Whenever USB traffic appeared the device reset and I could not figure out why. 2) I removed all occurencec of SEI in the ...
by cpldcpu
Thu Nov 28, 2013 5:24 am
Forum: V-USB
Topic: Using generic signal diodes instead of zeners
Replies: 3
Views: 6644

Re: Using generic signal diodes instead of zeners

This works better due to the differential signaling. I both signals were high at the same time, you would see an increase in voltage.
by cpldcpu
Tue Nov 26, 2013 7:09 am
Forum: V-USB
Topic: Entirely polled V-USB? [yes, it works!]
Replies: 18
Views: 20356

Re: Entirely polled V-USB? [yes, it works!]

Thanks for the explanation. I will try to implement this in the bootloader. I like the debugging by oscilloscope. I am using a bitbanged maximum speed SPI implementation as debug output on two unused pins. Then I use a logicanalyzer to capture both the SPI and USB traffic to get realtime debugging i...
by cpldcpu
Sun Nov 24, 2013 2:20 pm
Forum: V-USB
Topic: Entirely polled V-USB? [yes, it works!]
Replies: 18
Views: 20356

Re: Entirely polled V-USB?

Congrats on getting it to work! The small loop to detect the reset condition is odd. It should exit anyhow if no reset was asserted? And if a reset was asserted it should not enter it IRQ. So I don't understand why you had to add the polling loop there. Shouldn't it be sufficent to poll at "isN...
by cpldcpu
Sat Nov 23, 2013 9:19 pm
Forum: V-USB
Topic: Entirely polled V-USB? [yes, it works!]
Replies: 18
Views: 20356

Re: Entirely polled V-USB?

Quite a nice way of hijacking the interrupt. My first thought was to poll the port directly. But this opens an interesting opportunity to debug: You could read the interrupt flag after usbpoll returns to see whether any transmission was missed. Btw, I am not the original author of micronucleus. Blue...
by cpldcpu
Sat Nov 23, 2013 2:55 pm
Forum: V-USB
Topic: Entirely polled V-USB? [yes, it works!]
Replies: 18
Views: 20356

Re: Entirely polled V-USB?

That would actually be a really useful approach for micronucleus (m), which is probably one of the bootloaders you are referring to. Apart from USB handling and writing the flash, the CPU is basically idling. Interrupts have to be disable during flash writing anyhow. So there is nothing to lose. Wha...
by cpldcpu
Sun Nov 10, 2013 11:28 am
Forum: V-USB
Topic: Size optimized osccal / V-USB
Replies: 0
Views: 6009

Size optimized osccal / V-USB

Hi,

I submitted a size optimized version of osccal.c as a pull request to the v-usb github repository:
https://github.com/obdev/v-usb/pull/4

It saves about 95 bytes, which can be quite useful on small devices. Maybe it is of interest to some.

So far there was no reaction on github. Is the repository monitored?