Show Posts
Pages: 1 ... 357 358 [359] 360 361 ... 434
5371  Forum 2005-2010 (read only) / Interfacing / Re: Serial Communication Help on: November 22, 2007, 12:56:03 am
it needs to be sent a string like this ("!RC4", %00, "R", 1, 1).

Sigh.  No it doesn't.  What horrible documentation, hopelessly confusing the string "on the wire" with the command you have to give to a basic stamp to send that string.  Double Sigh.

The RC4 uses the "AppMod" protocol from Parallax.  I couldn't find a formal description of the protocol, but some of the documentation for the parallax add-on boards is a little better.  It looks like a command starts with a '!' character, followed by two bytes worth of board type ("RC"), one byte of "unit address" (binary for the RC4), followed by a command and arguments for the command (whose format is apparently device specific.)  So for the RC4 the command will look like "!RC4.R..", where the first "." is a binary zero, the second and third dots are binary 1.

So you might do something like
RC4_reset_relay(which, state)
  Serial.print("!RC4");           // Preamble and device identifier
  Serial.print(0, BYTE);     // which board (always zero)
  Serial.print('R', BYTE);     // command to set/reset individual relay
  Serial.print(which, BYTE);   // output which relay
  Serial.print(state, BYTE);   // and what state we want.
5372  Forum 2005-2010 (read only) / Interfacing / Re: ***help:  how to read analog output from on: October 25, 2007, 01:40:14 am
I looked at the datasheet, and:
1) No resistors should be necessary
2) the output should be directly compatible with the arduino analog inputs.
Are you sure you are connecting it properly?
5373  Forum 2005-2010 (read only) / Interfacing / Re: monitor ADB (apple desktop bus) mouse on: November 06, 2007, 09:03:11 pm
The last time I looked (I think I was contemplating a device to let me connect PS2 peripherals to an old Apple CPU), Apple had not published much (or anything?) about the operation of adb at the wire level unless you had licensed the details from them.  That made things rather difficult  smiley-sad
I'm pretty sure it's nothing as simple as "standard" async serial protocols.
5374  Forum 2005-2010 (read only) / Interfacing / Re: Searching for the right hardware on: November 02, 2007, 12:54:11 am
I've been told by people who should know that keyboards that sense how hard a key is pressed (ie electric piano things) do so by having two digital outputs near the top and bottom of the key movement, and then measure the time between the two closures.    They even call them "velocity sensitive."  That sounds a lot easier than an accelerometer (but it wouldn't give you "pressure" (I don't think an accelerometer would give you pressure either.))
5375  Forum 2005-2010 (read only) / Interfacing / Re: Read from multiple switches? on: October 11, 2007, 07:39:43 pm
There are also some hacks for reading multiple switches with a single A-D input; basically you set up a resistor matrix so that each key ends up creating a different voltage on the input; it's pretty easy to do  16 or more switches with a single input (and about 16 resistors :-)  The basic concepts are show in this PICmicro app note, but are applicable to any micro:
5376  Forum 2005-2010 (read only) / Interfacing / Re: Question about sending IR codes on: October 11, 2007, 06:59:21 pm
The circuit you reference uses an external IR transmitter IC, which cuts down on your flexibility a great deal.  You should consider having the arduino do its own modulation of a simple ~36khz oscillator (from a timer output or external 555); this would give you complete control (at the expense of some significant effort) of which devices you could control.  OTOH, if the dedicated IC works with your stereo, and that's all you want to control, it might be easier.  Looks like there's a good set of links here:
5377  Forum 2005-2010 (read only) / Interfacing / Re: audio input and output (in theory) on: October 11, 2007, 06:44:11 pm
both reading and writing analog data is going to be more than a single instruction,

I wasn't thinking about that.  Would the incoming audio have to be written into some kind of buffer and then read back out?  I sort of think of audio as just acting like an analogRead on a knob that's turning very very fast  smiley-wink  But I guess it's probably much more complicated than that.
I wouldn't say that it's MUCH more complicated than that, but have you looked at the code underneath "analogRead" to get an idea of its complexity?  Typically you tweak a bit to start a conversion, wait for the conversion to finish, read the data, and then set a timer for the next time you want to sample the input.  If you have an external converter, this probably happens over some sort of communications channel that may require additional bit-twiddling to talk to.  None of it is really "hard", but it all takes instructions, and the whole process is "hard" real-time;  start taking a little bit too long SOME of the time and the results will suck.

5378  Forum 2005-2010 (read only) / Interfacing / Re: audio input and output (in theory) on: October 10, 2007, 08:41:54 pm
I think you could do a fair amount of pass-through and simple processing of audio with an arduino.  As you say, 22k samples/second at 16MHz CPU speed gives you something like 700 instructions to "process" each sample.  Note that in general, both reading and writing analog data is going to be more than a single instruction, and "real" audio algorithms like digital filtering end up taking a very large number of cycles to implement (and perhaps lots of memory as well), but I bet you could do a pretty good job of (for example) recording audino to a serial flash chip or card, introducing distortion, etc; the sort of things people used to do with simple electronics cleverly used to make guitar effects devices, for example.  Compressing the audio using a modern scheme like mp3 is probably out of the question, though.
5379  Forum 2005-2010 (read only) / Interfacing / Re: parts parts on: October 10, 2007, 08:35:03 pm
sorry.  The 595 is one of several 74xxx595 "standard logic" chips.  You should be able to find a datasheet by searching for "74hc595."  I believe that the "shiftout" function mentioned in various places here is designed to write to 595-like chips, and will probably work with your UCN5821 as well.  A similar scheme is used as the basis ("physical layer" if you will) for somewhat more complex protocols like "spi" and "i2c", so it's both common and quite general purpose.
5380  Forum 2005-2010 (read only) / Interfacing / Re: parts parts on: October 10, 2007, 03:53:25 pm
The UCN5821 looks like a combination of the popular 595 (serial to parallel converter) and something like a ULN2803 (high current darlington driver.)  Nice chip, probably pretty useful for either small to mid-sized steppers or LED arrays on the cathodes (note: sinks current only, which means it goes in between your load device and GND...)

The DAC probably isn't very useful.  It'll use a lot of pins to essentially get you behavior similar to that provided by the PWM outputs already.
5381  Forum 2005-2010 (read only) / Interfacing / Re: 32x32 on: September 30, 2007, 10:59:11 pm
Someone should make a plug-in current monitor for USB...
5382  Forum 2005-2010 (read only) / Interfacing / Re: 32x32 on: September 29, 2007, 02:44:33 pm
The 595 doesnt multiplex so every single LED is on all the time.
erm - the 595 is a multiplexer, 3 inputs - 8 outputs.  smiley-wink
While the 595 has three control signals, it is not a "multiplexer" in either the digital logic sense or the display driver sense. The 595 is a shift register with an output register; a form of serial to parallel to converter.  It's outputs stay in one state till changed, so LEDs connected to those outputs ARE "on all the time."  You CAN multiplex (display sense) a display connected to 595s; a single 595 could drive a 4x4 array of 16 LEDs, and two could drive an 8x8 array; the rate at which serial data can be clocked into teh 595 is typically much faster than the display update rate for a multiplexed LED display...
5383  Forum 2005-2010 (read only) / Interfacing / Re: Driving 8x8x3 outputs on: September 26, 2007, 05:22:57 am
The same eBay vendor has some pretty nice mini-SD sockets...

5384  Forum 2005-2010 (read only) / Interfacing / Re: Driving 8x8x3 outputs on: September 26, 2007, 01:57:09 am
By the way, one of my favorite eBay sellers is selling an interesting 16-channel LED driver chip with built-in constant current source:

Pretty cheap, too.
5385  Forum 2005-2010 (read only) / Interfacing / Re: Driving 8x8x3 outputs on: September 22, 2007, 03:06:35 pm
My numbers say 1.2A.

8*8*3*0.02 = 3.84, yes?

You might consider partial multiplexing.  doing 64x3 (one multiplex plane for each color) would cut the number of resistors by 2/3 (since you'd only be driving one color at a time, you'd only need the resistor in the common line.)
Pages: 1 ... 357 358 [359] 360 361 ... 434