I spent some time looking for a way to test the virtual USB ("V-USB") possibility and functionality of this board. I stumbled across the EasyLogger project that looked like a great example to show if V-USB would work. In looking through the source code, it was clear that my board used different USB pins to the ATtiny85 than the stock EasyLogger program did, so I was certain that I wouldn't be able to use the included .hex file as it was. I managed to find the directions to equip my linux box with AVG-GCC and associated libraries. I changed the EasyLogger source code header file to point to the right two pins I had set aside for USB D+ and D- on this board and compiled a new .hex file. I was so stoked that it actually compiled, then, even loaded to the chip with AVRDUDE. Subsequently, I was printing numbers to a notepad in Windows and had the ATtiny recognized as a HID keyboard device. Yay!
I used the same AVRDUDE version and config file that comes with Arduino 1.01 to upload my own hex file. I found the commands for this by enabling the verbose output in the Arduino preferences. It shows exactly the command line required when you upload a sketch using an external programmer. Just pointing it to a different .hex file works well.
Helpful Links:
EasyLogger:
http://www.obdev.at/products/vusb/easylogger.html
Requirements to compile for AVR under Linux:
http://tldp.org/HOWTO/Avr-Microcontrollers-in-Linux-Howto/x207.html
Setting up the fuse bits on the ATtiny85 properly for V-USB:
http://codeandlife.com/2012/02/22/v-usb-with-attiny45-attiny85-without-a-crystal/
Saturday, September 22, 2012
Sunday, September 16, 2012
Arduino Sketch
This sketch seems to yield some good results. The flicker is kinda fast, but it sort of resembles a candle. I've had it "burning" here on my desk for about 4 hours on a 400mAh Lithium Polymer battery. I'm going to let it keep going until it just quits. I like it. Project success. I do plan to revise the hardware and make some changes, but an excellent first run.
Saturday, September 15, 2012
Hardware assembly and initial programming
The parts arrived about a week ago, but I've been busy working on another project. Needing a break from the other project, I spent time today getting the Candle+ soldered together and tested. I was pleased that it all came together rather easily and it all works. I spent a fair amount of time after the hardware assembly learning how to attach an Atmel MKII in-circuit system programmer to my computer and use it to flash code to the ATtiny85 chip. Since the programmer has a 2x6 header and my Candle+ board has a 1x6 header for programming, I needed to make a little adapter. I just soldered 26 gauge solid core wires between two properly sized header pin sets and it came out surprisingly sturdy and it works well. One thing that wasn't readily obvious is that the adapter makes for the same pin-out if you plug it in either way. Neat.
After working with this hardware and programming, I discovered that I cannot leave the LEDs attached while programming. Two of the LEDs I'm using share the MISO and MOSI programming lines. They must be disconnected if the programmer is to actually flash code to the ATtiny85. So, I think I'm going to configure some sort of switches (perhaps DIP switch block) into the next revision. For now, I just attached some tiny 30 gauge wires to each of the solder pads so that I can short them together when needed and separate them when programming. It isn't ideal, but works for now.
Links to helpful information:
Programming an ATtiny w/ Arduino 1.01
http://hlt.media.mit.edu/?p=1695
AVRISP mkII libusb drivers for Windows 7 / Vista x64
http://mightyohm.com/blog/2010/09/avrisp-mkii-libusb-drivers-for-windows-7-vista-x64/
How to configure the Atmel AVRISP MKii to work with Arduino IDE
http://arduino.cc/forum/index.php?topic=118089.0
Pictures:
Major features to notice: Yellow, Red & Blue large SMD domed LEDs in the center of the board. Battery connector on the left, micro-USB on the right. Power select switch at bottom for selecting between battery, USB or just off. Momentary push switch at about the 1:00 position.
After working with this hardware and programming, I discovered that I cannot leave the LEDs attached while programming. Two of the LEDs I'm using share the MISO and MOSI programming lines. They must be disconnected if the programmer is to actually flash code to the ATtiny85. So, I think I'm going to configure some sort of switches (perhaps DIP switch block) into the next revision. For now, I just attached some tiny 30 gauge wires to each of the solder pads so that I can short them together when needed and separate them when programming. It isn't ideal, but works for now.
Links to helpful information:
Programming an ATtiny w/ Arduino 1.01
http://hlt.media.mit.edu/?p=1695
AVRISP mkII libusb drivers for Windows 7 / Vista x64
http://mightyohm.com/blog/2010/09/avrisp-mkii-libusb-drivers-for-windows-7-vista-x64/
How to configure the Atmel AVRISP MKii to work with Arduino IDE
http://arduino.cc/forum/index.php?topic=118089.0
Pictures:
Major features to notice: Yellow, Red & Blue large SMD domed LEDs in the center of the board. Battery connector on the left, micro-USB on the right. Power select switch at bottom for selecting between battery, USB or just off. Momentary push switch at about the 1:00 position.
Subscribe to:
Comments (Atom)



