since this got deleted in the server outage, i'm recreating this thread. anyways, the idea is to get a 40h logic kit and a 4x4 button grid and matching pcb from sparkfun: http://www.sparkfun.com/commerce/product_info.php?products_id=7835 http://www.sparkfun.com/commerce/product_info.php?products_id=8033 wire it up with rgb leds (and hack the firmware to support rgb. since the system is designed to drive 64 LEDs anyways, driving 16 rgb LEDs shouldn't be a problem) the real fun part will be the hack that lets us use the other inputs as optical encoder inputs. this might require another uC, but it's worth investigating in my eyes. i'd love to use the actual 40h keypads, but if i'm not mistaken, those don't support the 5mm LEDs, and the pcbs in the keypad kits are 8x8, not 4x4, so i'd have to make my own pcb, which i'm not too interested in doing. the picture attached is a basic idea of what it will look like. as far as functionality, i am thinking it would be great to write some sort of interface for this device into monomeSerial or mapd. and then use it to control the prefix of the 40h (select from a bank) or to, for instance, switch pages in 64step. any thoughts would be appreciated. if anyone else is interested, then let's work together =)
on 04.08.2007 00:54
on 04.08.2007 01:33
word. I have the sparkfun buttons, no pcb, no top plate but it looks like those are finally in stock, I also have the logic board, parts and can get a hold of some encoders, looks like we talked me into it. I can burn the uC too, the only thing I'm unsure of is software development unless it's max/msp, which I'm n00b at. no need for a second logic board, an encoder turn just looks like button presses on two different pads. check out the upper right corner of the last page here http://www.bourns.com/pdfs/em14.pdf to see what I mean. so... 16 buttons on the 4x4 grid, how many encoders are you thinking? we can do up to 24 but that's insane, or is it? 3 groups of 8? what about a row of 8 encoders with buttons for each encoder? a la kenton style. thoughts?
on 04.08.2007 01:51
the thread/post dates were confusing me for a second dammit, I live in the US and I demand my god-given right to have dates presented to me backwards, and to use nonsensical standards of measurement, based on anatomical measurements of creatures which lived thousands of years ago.
on 04.08.2007 01:58
The dates ARE presented backwards! The 'right' way would be: 2007.08.04 ;)
on 04.08.2007 20:26
lol. the thumbnail for the image isn't showing up. i was thinking 2 rows of 4 encoders, so i guess that would mean using 32 of the 64 available channels? as far as the software goes, i'm most interested with finding a way for this device to work as a mapd controller, which totally sucks for cross-platform compatibility. either way, i think it'd be best to code the software for this device in some standard programming language (i.e. c) rather than max. maybe even java, since it has gui packages and the runtime is crossplatform already?
on 04.08.2007 21:23
cool. 16 buttons + 8 encoders = can take the place of 32 buttons. that's only half the device's capability but the idea is to make something simple. IMO putting a button or two dedicated to each encoder could be used as a mode switch, maybe just two buttons for the row for up/down bank switching. actually it might not be necessary to rewrite any of the uC software. an encoder turn shows up as two button presses real fast one after the other. the uC code debounces those presses (code that an encoder could would require), the signals hit monome serial then onto whatever app is out there waiting for code from the /box prefix. so... make an app that takes data from monome serial, change the monome serial prefix to /encoder and send the data out of this new app with a /box prefix. that might work, have to try it. the button debouncing is the main factor, it might be too slow for the encoder, we'll have to see. sound sane?
on 04.08.2007 21:35
sounds way sane. and way awesome. i think extra buttons by the encoders would be overkill, as the whole point of the 4x4 grid is to be bank/program/page selection, so the encoder functions would be application specific, and when the selected application changes, so do the encoders. encoders that also push in would be pretty cool though.
on 04.08.2007 21:52
oh yeah, the 4 buttons, makes sense. I've used the push encoders on my BCR to assign stuff but find when I'm not careful I can accidentally lean into the encoder and push the switch. but it seems we have a lot of the theory worked out, on to getting encoders and seeing how they play with the logic board. I also need to hook up with a sparkfun PCB and top plate, may be tweaking on this next weekend.
on 04.08.2007 21:58
ugh, forgot the color buttons, which is something I really want to try. that might entail reprogramming the uC. so... 16 buttons = 48 LEDs IOW 3 LEDs per button. maybe leave that bit for stage 2, need to think about it a bit.
on 04.08.2007 22:16
yeah, mixing intensities of each LED will be something to figure out. i suppose i should check out that MAX7219... paycheck comes soon, so i'll be picking up a logic kit and the stuff from sparkfun within a couple of weeks. =)
on 05.08.2007 02:00
On the Maxim website you can order free samples (of 7221's or whatever) and they send you 2 of each chip.
on 06.08.2007 07:09
tehn: i'm looking at the logic board schematic that the kit page links to, and i'm wondering how the 74LS164/5 chips are interacting with the atmega32. the datasheets tell me that the 74LS16x's are parallel<->serial converters, but it looks like port A on the atmega32 is used for both input and output? but only Port A is used for input? maybe i just need to read the atmega data sheet more in detail.. there is a lot to read there though! any help or insight would be awesome. thanks!
on 06.08.2007 14:04
ports on the atmel are configured per pin. so any pin could be an input or output, as defined by the DDRA reg (for portA). check the i/o section of the mega32 datasheet.
on 07.08.2007 06:27
> i'm wondering how the 74LS164/5 chips are interacting with the atmega32.
the atmel talks to both chips in serial mode, the 'other side' of both
chips are parallel. I'm being lazy and not fact checking/checking spec
sheets but I think I can swing it.
the 74HC165 is parallel in (buttons in parallel), serial out.
the pin SH/LD/ is an input
- 0 means load, hence LD/, usually written as /LD the / means invert,
like a ! in software. as long as that pin is low the chip loads in data
- 1 shift, as in shift out. set this to a 1 and...
- QH is the data output pin
- CLK is a clock, feed it a pulse stream of 1s and 0s at a rate dictated
by the spec sheet, probably as slow as you want up to a max speed.
typically on the rising edge of CLK the chip spits out a bit on the QH
pin.
so, hold SH/LD/ low until you're ready to read the chip then
- hold SH/LD/ at 1 to put it into shift mode
- present 8 clock pulses on CLK
- on each clock pulse read the QH pin for a bit.
the 74HC164 is the opposite
give it a pulse train on the CLK pin, 8 pulses for 8 bits
at the same time (usually on the rising edge of CLK) put the data bits
onto the A pin.
CLR is a clear pin, the circle means it's active low meaning when it's 0
the CLR command is asserted.
that should be correct, man I hate mondays... and working... and getting
up not in the afternoon. ;)
on 02.09.2007 00:05
a little progress update: i just finished soldering together my logic kit. i've got the buttons and the button breakout pcb, but i don't yet have any LEDs or the jtag programmer. i dont have a putty knife, so i'm either going to get one or find another way to open up my 40h. seems wise to test this logic board with the original 40h's keypad to make sure i've got it all working. next thing to buy is the jtag programmer, which will be nice, cause i also got an accelerometer from sparkfun for my 40h. once i've got the jtag programmer, i've gotta figure out how the software is going to work. i'm not yet sure how many colors i'll be able to squeeze out of the rgb leds, as the intensity of each led isn't exactly controllable (only the whole grid), so maybe it'll only be like, 8 colors. still worthwhile i think. edit -- i took the 40h apart to test the logic kit and it works like a charm. new serial number though! exciting!
on 18.09.2007 00:49
another progress update for anyone who's interested: work has halted for a short trip to LA (which ends wednesday if i can swing it, thursday if i can't), and will be postponed until the new logic kits come out. being a college student and all, i'm strapped for cash and since guesroc2002 emailed me about buying my 40h, i decided instead to build one from the kit for him. this will help me raise a few bucks to pay for the jtag programmer and some more of the parts. i still need to research the LED control scheme anyways.. 8 colors (7 colors + off) is clearly the easiest way to go and won't require much hacking. various intensities is a different story. i'm thinking KISS.
