haha very cool they actually build that entire controller around the 4021. A little while ago someone posted something about the very first pong machines, they were mostly transistors and a few TTL chips(older brother of cmos)

I don't really know much about the 4021 related to music but they are beeing used a lot in microcontroller projects, from the arduino.cc website:

Quote:

Sometimes you'll end up needing more digital input than the 13 pins on your Arduino board can readily handle. Using a parallel to serial shift register allows you collect information from 8 or more switches while only using 3 of the pins on your Arduino.

_________________There he goes. One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
Hunter S. Thompsonmoviesnoise

Well it is a great discovery! And just look at the exterior design of the controller too! NICE!! The only problem with posting this sort of information is those #@!? 'circuit benders' will be disrespecting and destroying a load of nice controllers!

heh the only reason i have nes controllers lying around was from my circuit bending days. Im going to a fennesz show tonight, but hopefully tomarrow i'll get a chance to get down an dirty with the 4021 and see if i can figure it out._________________home made noise and electronic ill-logic

and after some thought, this is how i plan to attempt to use the nes controller with my lunetta:

According to my research, the NES sends a rather high clock signal to the chip and with each pulse the status of each button is sent back to the nes in a specific order as a data string of high/low/1/0's. (Which i predict will act similar to a 4017 with all the outputs tied via switches.) Whether or not the rate of pulses returned are related to the speed of the clock input (i.e. a division of) is yet to be determined, but i bet it's probable.

I would wire it up like i doodled up in the graphic. The latch output would spit 1 "longer" pulse with each clock pulse in. The Pulse out would send a string of high/lows such as 10110111 or 00110110...but because of how the nes works the data should be flipped with an inverter (if one prefers).
and finally a clock in jack should be wired up too.

I think thats how it would work easiest.

I'll have to think of it a bit more but if it were possible to have 1 out put per button, that would be slick. This i guess would involve how the nes interprets the returned serial data.

I knew I'd be stirring a wasps nest up mentioning circuit benders! HA HA HA!!!! What's the matter? Didn't you like what Santa made you for Xmas? Look, I can see the joy it gives many.... but it's a bit over-rated if you ask me (not that you DID ask me).RANT ON/ A bit like 'DJ's..... flipping records used to be the mundane job of having a party... along with being the designated bong packer.... not sure how they ended up with 'hero' status! Circuit Benders and DJ's! /RANT OFF

That's a nice looking logic synth you have there! Great colour scheme! I was just wondering though if the D pad on the controller was doing much. Have you noticed a difference in the direction is is pressed or are all directions doing the same thing? Those controllers were a very stylish design, even looking great these days. I think the snes was not as good stylistically.... going off topic here again.....

sweet stuff stolenfat, really creative use of what most people would considder junk .

Seems like the 4021 and the melodygenerator are a perfect match, good to know. Ill add it to my list of things to keep my eyes open for when searching the local thriftstores._________________There he goes. One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
Hunter S. Thompsonmoviesnoise

I was just wondering though if the D pad on the controller was doing much. Have you noticed a difference in the direction is is pressed or are all directions doing the same thing?

Well, the d pad does at much as the rest of the buttons, but i'll explain why it seems a little less so:

the bits the 4021 nes controller spits out are in an exact order each time in accordance with the serial input pins of the chips.

A is first B is 2nd... and the d pads are at the end. the A bit for some reason is the strongest, or perhaps the longest, bit and has the most effect, when A and B are pushed together you are basically lengthening the size of the first bit which makes it even stronger (I believe). The d-pads only work one at a time (I THINK) so you cant join them all together to form 1 long giant bit, you end up getting 3 lows and 1 high (if you use an inverter) equaling one small quick bit- which is why it may seem like it isnt doing much to the enable pin of the slacker melgen. To a 4040 divider the d-pad bits have as much effect as the A button bit.

Quote:

nes-data.gif

Description:

as you can see in this image, the A button bit is way bigger than the rest- prolly to correspond with the latch input. the nes can read this just fine, but it affects the lunetta differently.

the latch input is actually just a pin on the controller connector. I havent done any soldering to the 4021, just the connector.

nintendo has it wired up in such a way that it needs a 'latch' pulse, i cant confirm nintendo's controller schematic since i havent busted mine open to take a peak. A regular 4021 seems a bit more complicated and has 3 outputs, and may not need a latch pulse.

its all very well documented in the links above, or google "4021 NES"

helpful? its still a mystery to me kinda _________________home made noise and electronic ill-logic

yea dr. offset- i predict that any amount of buttons could be used to set the parallel inputs of the 4021 to either V+ or Ground to get some sort of effect. More research needs to be done, but im at a pause till i get some 4034s

Here are sections of the 4021 datasheet , and setup with 8 "set parallel in" switches and "manual load". I made the JPG when I was into making little modules on small circuitboards I got from Inventor.

Not shown: If you want your pattern to recirculate once loaded you need to connect pin 3 (Q8 out) to pin 11 (serial in).

I drew this as a hardwired module just to get my head around the workings of the chip.

Lately I've developed a fondness of the dual 4-bit 4015 shiftregister. Since building on circuitboard (so no panels with switches) I abandoned using the 4021. But hey, the "load parallel" feature with recirculating the bits was nice indeed. Thanks for the reminder.

Also I can inform you that a SNES controller contains 2 x 4021, and has 12 individual buttons.

ah, thanks for that! Now I am wondering what other nintendo or sega products contain the 4021, raygun anyone?_________________There he goes. One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
Hunter S. Thompsonmoviesnoise

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum

Please support our site. If you click through and buy from our affiliate partners, we earn a small commission.