Go Down

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

mrburnette

Sep 11, 2013, 03:00 pm Last Edit: Sep 17, 2013, 10:53 pm by mrburnette Reason: 1
chachka n slang - (Yiddish) an inexpensive showy trinket


I purchased an Adafruit Trinket which is an Arduino (somewhat) compatible ATtiny85 board with a USB bootloader priced at $7.95 U.S.  I received it Monday and had a great play with it Tuesday before I decided that I needed to breadboard a DIP clone.

Added: PLEASE support Adafruit Industries and purchase at least ONE (1) Trinket if you plan on doing breadboarding.  The $8 will simply be good business, support Adafruit, and provide YOU with a firm foundation to work through issues you may have; that is, you will be able to use the Adafruit support forum and feel good about yourself.

Thanks to some very good documentation and the availability of the source files (Thank you Ladyada), the process was not overly painful.  I thought I would summarize the steps for those wanting to do the same.  For the record, the firmware to be compiled can run at both 8MHz and 16MHz and at 3.3V or 5V simply based on your needs.  I'm going to build the 5V version since it includes the two 3.6V zener diodes which provide for signal level conversion for the D+ and D- USB signals.

Schematics are here: http://learn.adafruit.com/introducing-trinket/downloads

Starting point-of-reference: Arduino version 1.0.5 full install (Windows)
Reference path: my installation on Vista installed here -
    C:\Program Files\Arduino_105\ You MUST make allowances for deviations in your installation!

Windows driver installation: http://learn.adafruit.com/usbtinyisp/drivers

Adafruit product page: http://www.adafruit.com/products/1501
Trinket guided tour: http://learn.adafruit.com/introducing-trinket
Optional AVR Tutorial document page: http://www.ladyada.net/learn/avr/index.html

Step-by-step AVRDUDE configuration changes: http://learn.adafruit.com/introducing-trinket/setting-up-with-arduino-ide

Boards.txt file:
Code: [Select]

trinket3.name=Adafruit Trinket 8MHz
trinket3.bootloader.low_fuses=0xF1
trinket3.bootloader.high_fuses=0xD5
trinket3.bootloader.extended_fuses=0xFE
trinket3.upload.maximum_size=5372
trinket3.build.mcu=attiny85
trinket3.build.f_cpu=8000000L
trinket3.build.core=arduino:arduino
trinket3.build.variant=tiny8

trinket5.name=Adafruit Trinket 16MHz
trinket5.bootloader.low_fuses=0xF1
trinket5.bootloader.high_fuses=0xD5
trinket5.bootloader.extended_fuses=0xFE
trinket5.upload.maximum_size=5372
trinket5.build.mcu=attiny85
trinket5.build.f_cpu=16000000L
trinket5.build.core=arduino:arduino
trinket5.build.variant=tiny8
 


The USB bootloader source code is here:
https://github.com/adafruit/Adafruit-Trinket-Gemma-Bootloader
Download the ZIP, expand in to a working folder, and create a batch file to build the bootloader as described below.

Referencing "my' location path for Arduino 1.0.5, C:\Program Files\Arduino_105\

Create a 'batch' file for Windows which adds the necessary utilities to the path environment.  Create this file in the the same folder as the expanded files from the Github download (folder with boot.c, jump.asm, etc.)

Code: [Select]

path=%path%;C:\Program Files\Arduino_105\hardware\tools\avr\utils\bin;
CMD /K "PROMPT $G &&CLS&&DIR"
cls
 


Note: You MUST provide your installation path correctly.  The "path=" command will temporary configure the Windows command environment to include the AVR utilities, in this case, the Make utility.

In the command window, type MAKE to run the downloaded makefile.  You will get six (6) HEX files: LV indicate 3.3V and HV indicates 5.0V.  BUT Adafruit ships the same HEX file on both their 3V and 5V configurations!  You will only need the file titled flash_me_lv.hex

Using your AVR ISP programmer (UNO, etc. running ArduinoISP) use the above HEX file and burn your ATtiny85P-PU DIP.  If you are using an Arduino as ISP, the command line appears as:
(Remember, your COM port will likely be different!)

Code: [Select]

avrdude -c arduino -P com9 -p attiny85 -b 19200 -U flash:w:flash_me_lv.hex:i 


The fuses are shown in the Board.txt file and configured as:
Code: [Select]

avrdude -c arduino -P com9 -p attiny85 -b 19200 -U lfuse:w:0xF1:m -U hfuse:w:0xD5:m -U efuse:w:0xFE:m  


READ THIS:

Quote
Please note: you cannot use the Adafruit USB VID/PID for your own non-Trinket/Gemma products or projects. Purchase a USB VID for yourself at http://www.usb.org/developers/vendor/


Added: The above quote is from Adafruit, however, this alternative may be viable: http://www.obdev.at/products/vusb/license.html. I personally have V-USB licenses for HID projects but I have NOT tried to modify the Adafruit .H file to determine if my codes will function in the boot loader. Just FYI.

Have fun!  Ray


Edit: Chachka on breadboard turning On/Off LED via "sony"-ish IR remote control ($1 Dollar Store Universal)
https://plus.google.com/102478464615720596560/posts/EDQ5pT2fXdq

nsx1

Ray,
   Great write-up! Like you I found the new little trinket to be quite useful. I, too, need to program a DIP version of the ATTiny85 with the bootloader. I followed your instructions and simply can't get the bootloader to compile. I've tried on a Win XP & Win 7(32 bit) machine with no success.

    I always get:
Process_begin: CreateProcess(NULL, avr-as -mmcu-attiny85 --defsym BOOTLOADER_ADDRESS=0x14C0 -o jump_lv.elf jump.asm, ...) failed.
Make (e=2): The system cannot find the file specified.
Make: *** [jump_lv.elf] Error 2

  No files are generated.  Any thoughts or ideas why it fails to compile using the makefile?

mrburnette

Gee, I really do not know why you are having issues with the make.  However, I did a replay on the session showing the specifics:

1) I unzipped the Adafruit file: "Adafruit-Trinket-Gemma-Bootloader-master"
2) I wrote a batch program to append the path to set my environment, then invoked it
3) I ran "make"

Here is the session:

Code: [Select]


> dir
Volume in drive C is SYSTEM
Volume Serial Number is 49E8-2F05

Directory of C:\Users\owner\Documents\Arduino_Resources\USB\Trinket\Adafruit-Trinket-Gemma-Bootloader-master

09/17/2013  03:47 PM    <DIR>          .
09/17/2013  03:47 PM    <DIR>          ..
09/03/2013  09:12 AM             6,455 avrdude.conf.addition.txt
09/03/2013  09:12 AM            19,267 boot.c
09/03/2013  09:12 AM             4,491 bootloaderconfig.h
09/17/2013  03:55 PM    <DIR>          Compiled_Hex
09/03/2013  09:12 AM             1,352 jump.asm
09/03/2013  09:12 AM            40,143 License.txt
09/03/2013  09:12 AM             6,133 Makefile
09/10/2013  11:55 AM               113 Make_CommandPrompt.cmd
09/03/2013  09:12 AM             3,375 osccal.c
09/03/2013  09:12 AM             3,594 osccal.h
09/03/2013  09:12 AM             4,870 osctune.h
09/03/2013  09:12 AM             1,548 README.md
09/03/2013  09:12 AM            16,671 usbconfig.h
09/17/2013  03:43 PM    <DIR>          usbdrv
              12 File(s)        108,012 bytes
               4 Dir(s)  101,041,905,664 bytes free

> path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\arduino_105\hardware\tools\avr\bin;C:\Program Files\Ar
duino_105\hardware\tools\avr\utils\bin;

> make
avr-as -mmcu=attiny85 --defsym BOOTLOADER_ADDRESS=0x14C0 -o jump_lv.elf jump.asm
rm -f jump_lv.hex jump_lv.hex.tmp jump_lv.eep.hex
avr-objcopy -j .text -j .data -O ihex jump_lv.elf jump_lv.hex.tmp
head -1 jump_lv.hex.tmp > jump_lv.hex
rm -f jump_lv.hex.tmp
avr-gcc -Wall -Os -ffunction-sections -fpack-struct -fshort-enums -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-f
unctions -I. -mmcu=attiny85 -DF_CPU=16500000UL  -DBOOTLOADER_ADDRESS=0x14C0 -DLOW_VOLTAGE -c boot.c -o boot_lv.o
boot.c: In function 'main':
boot.c:624: warning: 'noreturn' function does return
boot.c: At top level:
./usbdrv/usbdrv.h:223: warning: 'usbFunctionDescriptor' used but never defined
avr-gcc -Wall -Os -ffunction-sections -fpack-struct -fshort-enums -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-f
unctions -I. -mmcu=attiny85 -DF_CPU=16500000UL  -DLOW_VOLTAGE -c osccal.c -o osccal_lv.o
osccal.c: In function 'calibrateOscillator':
osccal.c:60: warning: implicit declaration of function 'usbMeasureFrameLength'
avr-gcc -Wall -Os -ffunction-sections -fpack-struct -fshort-enums -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-f
unctions -I. -mmcu=attiny85 -DF_CPU=16500000UL  -DLOW_VOLTAGE -o boot_lv.elf usbdrv/usbdrvasm_lv.o boot_lv.o osccal_lv.o -Wl,--relax
,--gc-sections -Wl,--section-start=.text=14C0
avr-size --format=avr --mcu=attiny85 boot_lv.elf
AVR Memory Usage
----------------
Device: attiny85

Program:    2846 bytes (34.7% Full)
(.text + .data + .bootloader)

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


avr-objdump -x -D -S -z boot_lv.elf > boot_lv.elf.lss
rm -f boot_lv.hex boot_lv.eep.hex
avr-objcopy -j .text -j .data -O ihex boot_lv.elf boot_lv.hex
avr-size boot_lv.hex
   text    data     bss     dec     hex filename
      0    2846       0    2846     b1e boot_lv.hex
cat jump_lv.hex boot_lv.hex > flash_me_lv.hex
avr-objdump -mavr -D flash_me_lv.hex > flash_me_lv.hex.lss
avr-as -mmcu=attiny85 --defsym BOOTLOADER_ADDRESS=0x1500 -o jump_hv.elf jump.asm
rm -f jump_hv.hex jump_hv.hex.tmp jump_hv.eep.hex
avr-objcopy -j .text -j .data -O ihex jump_hv.elf jump_hv.hex.tmp
head -1 jump_hv.hex.tmp > jump_hv.hex
rm -f jump_hv.hex.tmp
avr-gcc -Wall -Os -ffunction-sections -fpack-struct -fshort-enums -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-f
unctions -I. -mmcu=attiny85 -DF_CPU=16500000UL  -DBOOTLOADER_ADDRESS=0x1500 -c boot.c -o boot_hv.o
boot.c: In function 'main':
boot.c:624: warning: 'noreturn' function does return
boot.c: At top level:
./usbdrv/usbdrv.h:223: warning: 'usbFunctionDescriptor' used but never defined
avr-gcc -Wall -Os -ffunction-sections -fpack-struct -fshort-enums -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-f
unctions -I. -mmcu=attiny85 -DF_CPU=16500000UL  -c osccal.c -o osccal_hv.o
osccal.c: In function 'calibrateOscillator':
osccal.c:60: warning: implicit declaration of function 'usbMeasureFrameLength'
avr-gcc -Wall -Os -ffunction-sections -fpack-struct -fshort-enums -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-f
unctions -I. -mmcu=attiny85 -DF_CPU=16500000UL  -o boot_hv.elf usbdrv/usbdrvasm_hv.o boot_hv.o osccal_hv.o -Wl,--relax,--gc-sections
-Wl,--section-start=.text=1500
avr-size --format=avr --mcu=attiny85 boot_hv.elf
AVR Memory Usage
----------------
Device: attiny85

Program:    2798 bytes (34.2% 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    2798       0    2798     aee 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

> dir
Volume in drive C is SYSTEM
Volume Serial Number is 49E8-2F05

Directory of C:\Users\owner\Documents\Arduino_Resources\USB\Trinket\Adafruit-Trinket-Gemma-Bootloader-master

09/20/2013  11:43 PM    <DIR>          .
09/20/2013  11:43 PM    <DIR>          ..
09/03/2013  09:12 AM             6,455 avrdude.conf.addition.txt
09/03/2013  09:12 AM            19,267 boot.c
09/03/2013  09:12 AM             4,491 bootloaderconfig.h
09/20/2013  11:43 PM             7,819 boot_hv.elf
09/20/2013  11:43 PM            70,348 boot_hv.elf.lss
09/20/2013  11:43 PM             7,918 boot_hv.hex
09/20/2013  11:43 PM             8,256 boot_hv.o
09/20/2013  11:43 PM             7,867 boot_lv.elf
09/20/2013  11:43 PM            71,328 boot_lv.elf.lss
09/20/2013  11:43 PM             8,053 boot_lv.hex
09/20/2013  11:43 PM             8,288 boot_lv.o
09/17/2013  03:55 PM    <DIR>          Compiled_Hex
09/20/2013  11:43 PM             7,963 flash_me_hv.hex
09/20/2013  11:43 PM            52,337 flash_me_hv.hex.lss
09/20/2013  11:43 PM             8,098 flash_me_lv.hex
09/20/2013  11:43 PM            53,317 flash_me_lv.hex.lss
09/03/2013  09:12 AM             1,352 jump.asm
09/20/2013  11:43 PM               580 jump_hv.elf
09/20/2013  11:43 PM                45 jump_hv.hex
09/20/2013  11:43 PM               580 jump_lv.elf
09/20/2013  11:43 PM                45 jump_lv.hex
09/03/2013  09:12 AM            40,143 License.txt
09/03/2013  09:12 AM             6,133 Makefile
09/10/2013  11:55 AM               113 Make_CommandPrompt.cmd
09/03/2013  09:12 AM             3,375 osccal.c
09/03/2013  09:12 AM             3,594 osccal.h
09/20/2013  11:43 PM             1,060 osccal_hv.o
09/20/2013  11:43 PM             1,076 osccal_lv.o
09/03/2013  09:12 AM             4,870 osctune.h
09/03/2013  09:12 AM             1,548 README.md
09/03/2013  09:12 AM            16,671 usbconfig.h
09/17/2013  03:43 PM    <DIR>          usbdrv
              30 File(s)        422,990 bytes
               4 Dir(s)  101,041,840,128 bytes free

>
 


I went ahead and zipped up the LV and HV files so you can just burn them with ArduinoISP, etc. from the command line.

Ray


nsx1

Ray,
   Thank you for the prompt response. You're amazing!

   After looking at your detailed logs, I saw what the problem was and now can compile the bootloader myself.  The issue was the path. Your original batch file recommendation had the hardware\tools\avr\utils\bin listed. However, in your provided logs, the hardware\tools\avr\bin was also included. For some reason, the latter was not present in my normal path (I did install my arduino from the Zip file rather than the MSI file, not sure if that had anything to do with it). Once both paths were included, things worked like a charm.

   Thank you!

mrburnette

Quote
For some reason


Ah, the magic was in the file I use to drop to the command line:

Code: [Select]

path=%path%;C:\Program Files\Arduino_105\hardware\tools\avr\utils\bin;
CMD /K "PROMPT $G &&CLS&&DIR"

 


The Trinket is cute, but a wee delicate for the kind of development abuse I throw at projects.  Therefore, I keep a storage box with "real" UNO, Mega2560, Trinket, Leonardo, etc.) but I generally develop and debug on a solderless protoboard.  That way, my scope, DSG, and lab power supply are all easily connected.  The value of the "real thing' is appreciated when a brick-wall appears and I need to quickly know if I have a hardware issue or a software issue!  Dropping the code into an actual device is a quick decision-maker.

You will find a few Trinket-specific code samples I wrote for the Adafruit Forum here (very basic stuff for that audience):

http://forums.adafruit.com/viewforum.php?f=52

Specifically:




Ray

john1993

#5
Sep 22, 2013, 09:58 pm Last Edit: Sep 22, 2013, 10:00 pm by john1993 Reason: 1
great thread ray, but i also had problems building. what should take 5 minutes ended up 3 hours of tail chasing.

p.s. why providers dont tack on some hex is a mystery. only adds a tiny fraction to the zip file size so thats not an issue. imo it is a great help and generally courteous to give noobs (and occasionally self proclaimed experts like me) a helping hand. 5 seconds of your time can save what i estimate to be hundreds of man hours overall.

mrburnette

Quote
p.s. why providers dont tack on some hex is a mystery. only adds a tiny fraction to the zip file size so thats not an issue


My guess is that the product was released too soon, there are three hardware products that depend on the firmware and the core file is known to have a bug in PWM.  So, updates will need to be made ASAP.

In the case of Digispark, they did bind the HEX into their ZIP archive.

Ray

mrburnette

#7
Sep 29, 2013, 05:44 pm Last Edit: Sep 29, 2013, 05:49 pm by mrburnette Reason: 1
With a few weeks under my belt playing around with my Chachka, the 5V Attiny85 V-USB clone of the Adafruit Trinket (uses the Trinket bootloader which is "known" to AVRDUDE and therefore can upload from the Arduino GUI) I have found the device to be exceptionally useful for small projects and the V-USB enabled bootloader makes loadings small sketches of approximately 5.5K easy.  However, Adafruit released the Trinket without a lots of library support; but have added a few Trinket-centric libraries: refer to their support forum,
http://forums.adafruit.com/viewforum.php?f=52

But the topic of this post is that the Digispark tiny85 libraries generally work simply by #include and without issue.  This gives the Trinket, and use Chachka clone a wider range of proven libraries.  In particular, the HID keyboard which works wonderfully.

From my Trinket Forum post:
Code: [Select]

/*
HID_NTC_Temp (Arduino 1.0.5) Adafruit Trinket 5V 16MHz
Illustrates measuring temperature using an NTC thermistor in
a voltage divider configuration.  An Arduino Playbround Example:
http://playground.arduino.cc//ComponentLib/Thermistor2
Port for Adafruit Trinket by M. Ray Burnette 20130924
Sourcecode in Public Domain; No licenses or rights of use transferred
Binary sketch size: 4,944 bytes (of a 5,372 byte maximum)

// Schematic:
// [Ground] ---- [10k-Resister] -------|------- [Thermistor] ---- [+5v]
//                                     |
//                                Analog Pin 1
*/

#include <avr/power.h>
#include "DigiKeyboard.h"
#include <Streaming.h>

// For the Trinket, A1 is physical pin #7 (PB2)
int ThermistorPin  = 1;

// function follow
double Thermistor(int RawADC) {
 double Temp;
 Temp = log(((10240000/RawADC) - 10000));
 Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
 Temp = Temp - 273.15;            // Convert Kelvin to Celcius
 Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
 return Temp;
}

// Beginning of Arduino Stuff
void setup()
{
 if (F_CPU == 16000000) clock_prescale_set(clock_div_1) ;
 DigiKeyboard.sendKeyStroke(0) ;
 DigiKeyboard.delay(3000) ;     // Give Windoz time to initialize HID device - EXPERIMENT
 DigiKeyboard << (F("Trinket HID Temp \n \r")) ;
}

The Digispark stuff can be downloaded here:
https://github.com/digistump/DigisparkArduinoIntegration/tree/master/libraries

The folder you want is: DigisparkKeyboard and everything underneath.
which you will dutifully place in your Arduino Home User library. Mine is here;
C:\Users\owner\Documents\Arduino\libraries

void loop()
{
 int AnaRead ;
 DigiKeyboard.sendKeyStroke(0);
 AnaRead = analogRead(ThermistorPin) ;  // Read port
 DigiKeyboard << (F("RawADC = ")) << AnaRead << " = " << (int(Thermistor(analogRead(ThermistorPin)))) << (F(" Fahrenheit \n \r")) ;
 DigiKeyboard.delay(2000);
}
 


Here is the output which I captured using Notepad (excluding comments  XD):

Quote

Trinket HID Temp
RawADC = 500 = 75 Fahrenheit
RawADC = 501 = 75 Fahrenheit
RawADC = 502 = 75 Fahrenheit
RawADC = 503 = 75 Fahrenheit
RawADC = 504 = 75 Fahrenheit
RawADC = 504 = 75 Fahrenheit <--- Pinched thermistor
RawADC = 536 = 81 Fahrenheit
RawADC = 544 = 82 Fahrenheit
RawADC = 546 = 82 Fahrenheit
RawADC = 543 = 81 Fahrenheit <--- Gust of canned air
RawADC = 534 = 80 Fahrenheit
RawADC = 506 = 75 Fahrenheit
RawADC = 467 = 69 Fahrenheit
RawADC = 441 = 65 Fahrenheit
RawADC = 440 = 64 Fahrenheit <--- Air off
RawADC = 447 = 67 Fahrenheit
RawADC = 468 = 70 Fahrenheit
RawADC = 480 = 71 Fahrenheit
RawADC = 488 = 73 Fahrenheit
RawADC = 493 = 73 Fahrenheit
RawADC = 496 = 74 Fahrenheit
RawADC = 500 = 75 Fahrenheit
RawADC = 501 = 75 Fahrenheit
RawADC = 502 = 75 Fahrenheit
RawADC = 503 = 75 Fahrenheit
RawADC = 504 = 75 Fahrenheit
RawADC = 504 = 75 Fahrenheit


The Digispark stuff can be downloaded here:
https://github.com/digistump/DigisparkArduinoIntegration/tree/master/libraries


The folder you want is: DigisparkKeyboard and everything underneath.
which you will dutifully place in your Arduino Home User library. Mine is here;
C:\Users\owner\Documents\Arduino\libraries

koogar

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

Cheers

koog

mrburnette

Quick search did not reveal anything recent enough to be indexed by Google  :smiley-eek-blue:

https://code.google.com/p/arduino-tiny/issues/detail?id=65
seems to suggest the tiny core files will compile with the t84.

But, I have not tried this tiny.

As the t84/t85 have the same SRAM and FLASH, the bootloader should not require a significant amount of modification, if any.  The core files should handle it (hoepfully.)  Please report back if you try it.


Ray


koogar

#10
Oct 31, 2013, 10:18 pm Last Edit: Oct 31, 2013, 10:31 pm by koogar Reason: 1
Hi Ray

I am trying to compile the trinket source for an Attiny84 as it uses V-USB  if I used tiny core bootloaders I would need a serial chip for use with the Arduino IDE.

I already have an Attiny84 V-USB project on a custom PCB  (below)






I just thought it would be nice to have the option of an  Arduino bootloader on it.

The first PCB for the project  was actually for an Attiny85 but without a crystal OFC, but enumeration becomes unstable especially between different computers.

With a Attiny2313 or a 84 with a crystal it works on every pc I throw it at  whether its USB1,2 or 3 port. I think Adafruit suggest not using USB3 Ports at all with the trinket and I can see why, but unfortunately on allot  of modern laptops and later chip sets USB3 is the only option, so it is sometimes pot luck whether it with work or not .

I also noted on some hardware the attiny85 would not even survive a reboot without re-inserting the device.

When i compile the altered source i get an error though.  :smiley-eek:

Cheers

Koog

mrburnette

#11
Nov 01, 2013, 01:53 am Last Edit: Nov 01, 2013, 01:57 am by mrburnette Reason: 1
Very neat & professional t84 project, koogar  :D

I use xtal16MHz with all of my V-USB on mega328P projects and Optiboot bootloader- never had an issue from XP to Win8.1 BUT none of my many notebooks are USB3 equipped so I am unsure if an issue would exist, but I am hopeful that there would be none.

The Trinket gave (me) lots of sync errors.  Adafruit is insistent to use the existing VID/PID AVRtinyISP definition used with AVRDUDE.  Digispark, took a totally different route with a custom boot loader exec. and this seems stable in my limited testing.  None of my t85 projects have used bootloaders, just ISP.  I have built 3 prototype Trinkets (now Digispark) for bench playing.  I am unsure if I would be willing to sacrifice 2K in a real project!

For Trinket & Diguspark, I have not attempted to modify the bootloaders, rather just using the provided make to build the source.
I DID note while reading through the Digispark Forum that there is a send-only driver InSide the Digispark core.
http://digistump.com/board/index.php/topic,927.0.html
Interesting - I have not profiled this against Gammon's send only software serial, but it may be lighter weight.

Ray

koogar

Have you had a play with the Adafruit IRKey  source  yet Ray ?

Adafruit IRKey  http://www.adafruit.com/products/1560

https://github.com/adafruit/IRKey


sej7278

colour me stupid, but what is the point of the trinket? essentially it just seems to be an attiny85 with a usb connector and a bootloader to make it easier to flash via the ide.

but who needs to lose memory just so they can use usb? an isp is just as easy.

also their core doesn't seem to be as good as the arduino-tiny core, as it doesn't support 3-4 pwm pins, only 2.

mrburnette

#14
Nov 08, 2013, 02:18 pm Last Edit: Nov 08, 2013, 02:48 pm by mrburnette Reason: 1
@sej7278
Quote
but what is the point of the trinket?


The small form-factor in a commercial product that is V-USB is the point.  V-USB, for novices, can be tricky because of the component values.  Also, Adafruit is producing it in 3.3V and 5.0V versions.  These tiny, high quality boards, are ideal for a singularity of use.  Once could easily spend more than $8 in securing quantity-one parts.

"their core doesn't seem to be as good"
Yep, agreed.  But then there is the Digispark core and their libraries.

@koogar:
Quote
Have you had a play with the Adafruit IRKey  source  yet Ray ?

Not yet.  Last weekend was the Stone Mountain Hamfest in Lawrenceville and I had been busy putting together Magic Morse units for sale.  The weather was beautiful, the crowd a bit light, and folks were tight with their dollars, however I did manage to make the trip worth my while... well, I only live 2 miles away  XD

I'll have a look at this IR key thingy.  I have my own way of doing IR for my projects by off-loading the IR to a dedicated attiny85:
http://forum.arduino.cc/index.php?topic=139907.0

Ray

Update:
Now that Frank Zhao is an engineer with Adafruit, I think we will continue to see a proliferation of V-USB stuff.  Frank is probably best know as the designer and marketer of the USnooBie:
http://eleccelerator.com/usnoobie/
which was somewhat the inspiration for my HID 14 channel 328P-PU logger:
http://www.instructables.com/id/Arduino-Digital-and-Analog-logging-using-V-USB/

(Note: Yes, RayBurne and I are the same.)

Update 2:
@Koogar:

Ok, I looked at the Adafruit IR thingy... Here is the only significant "value" that I found:
Quote
We bundle this with our remote with 21 buttons so it controls nearly anything you want.


Essentially, it is a turnkey little unit.  However, I think the price is way too expensive by at least 2X... the little IR hand transmitters are available inexpensively from Hong Kong... I have 10 of them in the lab right now, but I still like the idea of using a "Sony" Universal remote because you are not painted into a corner should you step on your IR remote and crush the beast like a bug.  :smiley-eek:
http://www.ebay.com/itm/HX1838-Infrared-Remote-Control-Module-Code-Infrared-Remote-Control-Code-Infrared-/400529215865  
So, about $5 unit 1 including shipping.  I bought 10x because the shipping is free then and I had a few folks interested in a couple each... they have yet to follow through on pickup, however!  

Go Up