DIY USB password generator

This article describes an implementation of the DIY USB password generator. It is a small USB HID keyboard device that types a password stored in EEPROM every time it’s attached.

Digispark01The implementation was on a Digispark ATTINY85 General Micro USB Development Board which was purchased on eBay for a few dollars.

The board uses different pin connections to USB to the original, and requires a hardware jumper from D+ (PB4) to INT0 (PB2).

In the process of changing the code, I updated the V-USB driver. That necessitated quite a few changes to source code.

The updated code was compiled, and tested just fine.

Changed / updated code (includes hex): usb_tiny85_passgen.zip.

 

 

 

USBTiny

I bought a USBTiny AVR programmer on eBay for about A$8 posted.

HOT NEW Usbtinyisp AVR ISP Programmer FOR Arduino Bootloader MEAG2560 UNO R3 | eBay - Mozilla Firefox firefox 06/08/2015 , 08:24:12

 

Above, the seller’s pic of the package.

It is almost always the case that the ISP headers on the programmer use the standard pinout published by Atmel, and in that case the supplied ISP cables need to be pinned pin for pin, ie pin 1 to pin 1 etc.

If you look carefully at the pic, the key is towards the top of the pic which means pin 1 on the right hand plug is towards the viewer and pin 1 on the left hand plug is away from the viewer. The cable does not connect pin 1 to pin 1, and as a consequence the package did not work.

6wayDil

There is more than one way to connect these plugs, and above is one way that does connect pin 1 to pin 1, and the cable and USBTiny work. Though the seller has been told of this defect, he continues to sell the item with the pic of the defective cable.

One wonders how many thousands of these things are and will be sold with this defect.

 

Programming jig for STC15Fx DIP-8, DIP-28 chips

The STC15Fx chips use a simple TTL/CMOS async programming interface that is suited to the common USB-RS232(TTL) adapters, some of which are less than A$2 on eBay (CH341 chip).

STCMicroPgmAdapterAbove, the completed adapter. Both DIP-8 and DIP-28 are located furthese from the operating lever, and pin 1 towards the operating lever, the same jumper connections are used for both chip sizes for STC15F104E and STC15F204E.

There are two spare Gnd pins next to the black jumper above but hidden from view. They are for grounding jumpers that may be required to enable programming of some ‘bootloader protected’ chips.

The 6 pin male and female headers at lower left accept a USB-RS232 adapter (break out board style or cable) with the common Arduino pinout. The only thing that commits the pinout is the 1µF bypass capacitor between Vcc and Gnd pins and the spare Gnd pins. The USB-RS232 adapter powers the chip being programmed, and it needs to be a 5V adapter.

Alternatively one of the little MAX232 adapter boards could be used with a physical RS232 port, but power will be required.

 

Time to get some experience with 32bit microcontrollers

After almost 50 years working with 8bit microcomputers and microcontrollers, I thought it about time to get my hands dirty on some 32bit microcontrollers.

The plan is to investigate two streams, one ST Microcontoller based and one ATMEL based, both ARM architecture. Continue reading Time to get some experience with 32bit microcontrollers

Capturing the AVR hex file built by Arduino on Windows

One often sees enquiries by people trying to save the hex file made during the Arduino build process.

It is not trivial, as in their wisdom, Arduino hides these details, and builds the hex file in a randomly named temporary directory for each IDE which it deletes when the IDE is closed.

There are times when you may want to save the hex file, perhaps to load it without a bootloader or using a non-supported bootloader, Flashing LED driver using an ESC was just such a project. Continue reading Capturing the AVR hex file built by Arduino on Windows