Minimus Pin Functions v1.2

Posted on 2012-09-14 in misc

Minimus Pin Layout v1.2

Got fed up of not having the interrupt identifiers on the original minimus pinout i made, so here is version 1.1 with interrupt numbers labelled!

Stay tuned for a pinout of the Minimus 32K, as UK hackspacers have just bought over 300 of them to play with!

UPDATE: I have checked the atmega32u2 datasheet, and all pins and functions are the same as the at90usb162, so the above sheet will work for both.  Yay!

UPDATE: Oops, had the LED pins switched. fixed in v1.2


The PANIC Button

Posted on 2012-02-19 in makes

Ok, bit of explanation first.  We have an iMac set up as a 'democratic jukebox' at Hackspace Manchester.  The idea being that anyone can put music on it, and it plays the entire library on shuffle during our hack sessions for a bit of background music.

The problem is, of course, some people have an... odd taste in music, so sometimes the jukebox ends up flipping between Aqua and Cannibal Corpse for ten minutes, and the horror of this was just too much!

Enter the PANIC button.

PANIC

The button uses a minimus board. The minimus is a carrier for the AT90USB162, an AVR microcontroller with onboard USB hardware, which means it can be programmed to show up as any USB device.  Before getting the button I modified one of the pieces of LUFA demo software, a media keyboard, and stripped it down to just read the one button on the minimus.  When the button is pressed, it sends the keycode for next track. 

The button's housing is a joke button that played an alarm and flashed when pressed, I ripped its guts out to get to the switch.  After finding the switch contacts on the original board, i soldered on two wires to connecto to the AVR.

Inside

Next,  I stripped off the USB connector  from the minimus, and added a 1m USB lead directly to the pads, to make it fit in the old speaker housing section of the button.  I connected the leads from the button to PD7 and GND on the minimus, the same as the onboard button.  This has the handy side effect that if the button is pressed while being plugged in, it boots into DFU mode, allowing me to upgrade the firmware easily.

Minimus

I cut a slot in the casing for the wire to escape, and added a couple of cable ties for strain relief.

Press Button, Song Skips, Panic averted!

Finished


Minimus Pin Functions

Posted on 2012-02-13 in misc

Minimus Pin Functions

Whipped up this quick cheat sheet with all the different functions each minimus pin can perform.


Speak and Spell - Keyboard Matrix

Posted on 2011-01-27 in misc

Speak and Spell

Tonight i spent some time at Hackspace Manchester reverse engineering the keyboard matrix on our speak and spell, in preparation for hooking it up to an MBED.  Since nobody else has released this information (as far as i can tell), here is the pinout:

pin 3 4 5 6 7 8 9 10
1 u k off a f ? p z
2 v l go b g & q `
11 w m < c h ??? r #
12 x n " d i :) s /
13 y o _ e j on t return

This means that when the 'off' button is pressed, for example, pin 1 and pin 5 will be connected together.

To read a matrix keyboard like this, we write some code that steps through the 'down' set of pins (1, 2, 11, 12, 13), holding them low one at a time, then checks each of the other pins (3-10) to see if anything is being held low. If so, we perform a lookup on the table above.


AVR GCC Bit Manipulation Macros

Posted on 2008-07-27 in misc

These are some macros i originally found on avrfreaks for bit manipulation. I have posted them here in case they are useful to anyone.

1
2
3
4
5
6
7
#define bit_get(p,m) ((p) & (m))
#define bit_set(p,m) ((p) |= (m))
#define bit_clear(p,m) ((p) &= \~(m))
#define bit_flip(p,m) ((p) \^= (m))
#define bit_write(c,p,m) (c ? bit_set(p,m) : bit_clear(p,m))
#define BIT(x) (0x01 << (x))
#define LONGBIT(x) ((unsigned long)0x00000001 << (x))