Go Down

Topic: Chachka - My Trinket Clone (tiny85 powered) (Read 47199 times) previous topic - next topic

koogar

#15
Nov 15, 2013, 11:54 am Last Edit: Nov 15, 2013, 11:55 am by koogar Reason: 1
Heres the Trinket clone of my USB volume control just for kicks :)





Cheers

Rupert

http://runawaybrainz.blogspot.co.uk/

mrburnette

Quote
Heres the Trinket clone of my USB volume control just for kicks


@koogar:
This may be one of the coolest V-USB projects that I have ever seen... it is primo-professional.  Congrats!


Ray

bircoe

koogar: I spent a few days trawling through your blog last week when I was doing some research on making my Trinkets behave and might I just say some of the stuff you've done is amazing, I especially liked the crystal cmoy amp!

How much would I have to pay you for a hardware kit for the t85 Volume control? :) I'd be interested in purchasing a case, PCB and the volume knob you used!

Cheers.

mrburnette

@bircoe:
Quote
How much would I have to pay you for a hardware kit for the t85 Volume control? smiley I'd be interested in purchasing a case, PCB and the volume knob you used!


Yes, I too was impressed by koogar's work.  Generally, however, unless the forum topic is specifically geared to collecting interest in pre-orders, group orders, or similar issues, it is more proper to just PM the forum member.  You can do a PM simply by clicking on the person's forum name and then selecting "Send this member a personal message." from the status page.

Also, the Products and Services forum is a good place to post professional services and anything-goes in Bar Sports.

By keeping the posts relevant (like, what I am not doing now) they are easier for others to reference in the future.


Ray

f41_ardu

#19
Feb 08, 2014, 07:43 am Last Edit: Feb 14, 2014, 07:39 pm by f41_ardu Reason: 1

Has anyone got a make file or source to compile Trinket to an ATTINY 84 by any chance ?

Cheers

koog


Yes, since yesterday evening. But not tested yet ;->
Don't know yet if it  will work.  I'll try later today.  

Update: So far it don't work. Require further modification and the answer of the question if v-usb can be used with PCINTX instead of INT0.

OK, made that issue. USb renumeration is now working.  But now I have to find how to calculate the propper Bootloader adress. Size is now  2754.

Code: [Select]

avr-size boot_hv.hex
  text    data     bss     dec     hex filename
     0     2754      0    2692     a84 boot_hv.hex
cat jump_hv.hex boot_hv.hex > flash_me_hv.hex
avr-objdump -mavr -D flash_me_hv.hex > flash_me_hv.hex.lss


Code: [Select]

avr-gcc -Wall -Os  -I. -mmcu=attiny84 -DF_CPU=16500000UL  -o boot_hv.elf usbdrv
usbdrvasm_hv.o boot_hv.o osccal_hv.o -Wl,--relax,--gc-sections -Wl,--section-st
rt=.text=1500
avr-size --format=avr --mcu=attiny84 boot_hv.elf
AVR Memory Usage
----------------
Device: attiny84

Program:    2814 bytes (34.4% Full)
(.text + .data + .bootloader)

Data:        200 bytes (39.1% Full)
(.data + .bss + .noinit)


avr-objdump -x -D -S -z boot_hv.elf > boot_hv.elf.lss
rm -f boot_hv.hex boot_hv.eep.hex
avr-objcopy -j .text -j .data -O ihex boot_hv.elf boot_hv.hex
avr-size boot_hv.hex
  text    data     bss     dec     hex filename
     0    2814       0    2814     afe boot_hv.hex
cat jump_hv.hex boot_hv.hex > flash_me_hv.hex
avr-objdump -mavr -D flash_me_hv.hex > flash_me_hv.hex.lss


Current result, output from Ardiuno. Indicate a timing issues as we have with the 85?  

Code: [Select]

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0040
        0x01 != 0xff
avrdude: verification error; content mismatch


LED behave as expected, but LED on PB1 don't work
Build a breadboard trinket. load firmeware and  ....
same result.

Code: [Select]

avrdude: 832 bytes of flash written
avrdude: verifying flash memory against C:\DOKUME~1\tom\LOKALE~1\Temp\build6703630600105920193.tmp\blink84.cpp.hex:
avrdude: load data flash data from input file C:\DOKUME~1\tom\LOKALE~1\Temp\build6703630600105920193.tmp\blink84.cpp.hex:
avrdude: input file C:\DOKUME~1\tom\LOKALE~1\Temp\build6703630600105920193.tmp\blink84.cpp.hex contains 832 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.13s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
        0x20 != 0x00
avrdude: verification error; content mismatch

.....

Did I say I give up! Never, ever!

Rolf,I would never give up as instructed by Oliver Kahn.

Make the Attine85 breadboard version. It is working now.
So I'm close to make the Attiny84 working!

nyukin

#20
Feb 16, 2014, 10:23 pm Last Edit: Feb 16, 2014, 10:25 pm by nyukin Reason: 1
Thank you for the write up Ray,

Would you run make with my modified usbconfig.h on your computer and upload the resulting flash_me_lv.hex file for me please? An explanation of why I need help follows:

I've followed your guide on my linux machine and while I can upload the bootloader to the ATtiny and see it enumerate on my Mac with my own USB VID/PID pair, I'm running into a problem where the bootloader restarts continuously. Even if I don't edit the usbconfig.h file I get the same result, despite the board I made working as expected with the trinketloader.ino sketch. So I've narrowed down the source of my troubles to the linux environment I'm using to either make or upload the hex file and if you make it for me on your known-good setup it should either work or tell me that there's some problem with how I'm trying to upload the hex.

I made a trinket clone called Demiduino tiny with a purple PCB that uses all through-hole components. I focused on a low BOM cost and reproducing the shape/look of a regular Arduino board so that I can give it away to my friends to teach them how to solder and get them into electronics and Arduino. I'll post the usbconfig.h file I modified and a picture of the board too. Also if I can get this to work for my board then it'll be proof that Chachka can have it's own VID/PID pair quite easily too. Thank you for the help.

mrburnette

@nyukin:

NP
Attached.

Good luck,
Ray

nyukin

#22
Feb 17, 2014, 10:32 pm Last Edit: Feb 17, 2014, 10:34 pm by nyukin Reason: 1
Hi again!

The recompiled bootloader you posted for me from your machine had the same result where the bootloader continuously restarts itself. This helped me narrow it down like I mentioned though, so thanks. I didn't think about how talking about my own trinket clone might seem a little like I was trying to hijack your Chachka thread, so I'm sorry if it came off that way.

Anyways since you helped me I wanted to return the favor. I'm happy to report after chipping away last night until 2AM and all this morning, I've finally got my trinket clone working with the Aduino IDE using my own USB VID/PID.  This would be helpful if you wanted to build many more Chachkas and give them away, or if people reading your instructions want to do the same, because using your/their own VID/PID will appease the USB-IF overlords and keep Adafruit happy. However, getting to this point was not as easy as just recompiling the trinket bootloader from source with a quick change to the usbconfig.h file.

I found out that if I flashed the original bootloader, while it initially would reload the bootloader continuously, I could use avrdude from the command line to upload trinketblink.hex and then the problem I've described would go away and stay gone. Progress. However, if you change the VID/PID of the trinket clone's bootloader like I did, avrdude will no longer find a USBtinyISP programmer since it's expecting the Adafruit's specific USB/VID pair for that as well. Unfortunately, convincing avrdude to sub that pair for your own is not as easy as editing the .conf file. You need to recompile avrdude from source now as well, and in the source files you edit the usbtinyisp.h file to update your VID/PID pair there too. Take your new avrdude (I built version 6, I think the "easy" Arduino IDE Adafruit provides is based on an older version, I forget, but it worked anyways), put it in the IDE, and there you go. Obviously you have your own version of the IDE that will no longer talk to a Trinket with Adafruit's USB pair, but that's the point.

I used a lot of run-on sentences there but I hope it helps you or anyone else wanting to make themselves a Chachka, etc without incurring the wrath of the USB deities. Many thanks.

mrburnette

Quote
I didn't think about how talking about my own trinket clone might seem a little like I was trying to hijack your Chachka thread, so I'm sorry if it came off that way.


The thread is public... and I am happy you managed to discover the issue.  I've used my VID/PID pair with the rancidbacon keyboard.h V-USB port for the 328 and had no issue, but then it was compiled under Arduino GUI... and did not invoke the V-USB in the bootloader.

Very interesting solution, the recompile of AVRDUDE.  Thanks for posting the fix and for explaining what needs to be done to keep the VID-police at bay  :smiley-eek-blue:


Ray

Mike M

#24
Aug 29, 2014, 11:22 pm Last Edit: Aug 29, 2014, 11:24 pm by Mike M Reason: 1
Hello,

I've built a Trinket Clone following Adafruit's schematic and flashed the bootloader successfully.  However, the bootloader does not run when I connect the board to my computer.  I don't see the USB device enumerate and the LED on PB1 does not flash.

I've checked my schematic, layout, and component values and I've looked at the pin voltages, 5V, and gnd.  Nothing funny is going on.  I can also talk to the Attiny85 with an ISP programmer, so the chip isn't dead.  Any suggestions for what might be going on?

Also, I know this is an old thread but it seemed very relevant.

PS. I'm on Mac OS X 10.9 and I've tried the USB3 port and a USB2 hub.

mrburnette

#25
Aug 30, 2014, 04:09 pm Last Edit: Aug 30, 2014, 04:23 pm by mrburnette Reason: 1

...
I've checked my schematic, layout, and component values and I've looked at the pin voltages, 5V, and gnd.  Nothing funny is going on.  I can also talk to the Attiny85 with an ISP programmer, so the chip isn't dead.  Any suggestions for what might be going on?


The 'core' software used in the bootloader is from http://www.obdev.at/products/vusb/index.html
That is the logical place to start as they have a forum discussing the state of that art.

However, if you have flashed the bootloader AND set the fuses correctly, the most likely culprit is the 3.6 volt zener diodes.  These simply must be low-capacitance junction devices which essentially boils down to a low wattage zener device.  Not all zeners are useful even though the published specs match.  I understand that hobbyists may balk at ordering directly from Newark because of the high-shipping cost, but unless you can cross-reference an exact duplicate zener from another source, your options are few.  I would suggest that you and a few Arduino friends go in together to share the cost of a moderate order, > 99 units.

Part: 3.6 V 0.5W Zener
#: Vishay 1N5227B-TAP
Newark SKU: 18M3528 http://www.newark.com/vishay-semiconductor/1n5227b-tap/zener-diode-500mw-3-6v-do-35/dp/18M3528?ost=18M3528

Note added: The diodes I purchased in the past were glass and the picture at Newark.com is showing a composite; while such things should not represent an issue, my disclaimer is that I did not utilize the exact device being shown on Newark and therefore cannot guarantee success.

Hop over to Adafruit and read about it in the Trinket forum.
https://forums.adafruit.com/viewforum.php?f=52


Ray

Mike M

Thank you for the response.  I've tried some other non-USB test programs using an external programmer and the IC and the rest of the few components seem fine so it must be the zener diodes.  Thanks for the Newark link, I've ordered a few of those and will try them out when they come in.

Go Up