tomaskovacik / vwcdavr

AVR alternative to vwcdpic HW+SW
54 stars 35 forks source link

No CDC detected using ATtiny85 #12

Closed lachaka closed 4 years ago

lachaka commented 4 years ago

Hi, I can not simulate a CDC using the "cdc_arduino_ported_k9spud_vwcdpic_just_8bit_timers" version. On the serial monitor I got only the welcome text and the radio says " No CDC". The other version works fine, tested with atmega328. Tried to slap Clk and Data in, but still no result.

tomaskovacik commented 4 years ago

attiny85 at 8MHz ?

lachaka commented 4 years ago

yep

tomaskovacik commented 4 years ago

try this sketch on atmega328

lachaka commented 4 years ago

Nothing happens, I even don't get "No CDC"

tomaskovacik commented 4 years ago

try uncoment //_delay_loop_1(40); on lines 1134 and 1158

lachaka commented 4 years ago

Now on atmega328 is working, on attiny is the same

tomaskovacik commented 4 years ago

are you using HW pin 7,6 and 5 ? DataOut -> 7 (INT0) DataIn -> 6 (PB0) Clock -> 5 (PB1)

lachaka commented 4 years ago

Yes, but pin 5 is PB0 and 6 is PB1. Anyway after slapping still not success.

tomaskovacik commented 4 years ago

yep, pb0 is 5, but it strange, anyway I cannot help you more right now, I will test it tomorow t.

lachaka commented 4 years ago

No worries. When the radio is powered off I got "00" dataerr and on powering it up another ones but a little bit different, if helpful.

tomaskovacik commented 4 years ago

I just test code as it was (no delay when clocking out data) and it works without problem, but I put defined 5microseconds delay there so it is same as 3timer version. Anyway,here is output: image

tomaskovacik commented 4 years ago

20200929_085140.jpg

lachaka commented 4 years ago

Now the CDC is detected and I got all six CDs, but after clicking two or three times any button the radio blocks and got dataerr in serial monitor. Maybe some other delays are needed.

tomaskovacik commented 4 years ago

and what you did exactly? , as you can see I got to track 15 so -> 30 commands, got through.

you can play with CLK_DELAY value

lot of times, bad ground connection is problem. check that also