Show Posts
Pages: 1 ... 441 442 [443] 444 445 ... 593
6631  Using Arduino / Microcontrollers / Re: Cheap External Chip Needed on: May 15, 2011, 10:14:26 pm
pulseIns() waits for an edge then times to the next edge. So it could wait for quite a long time. If you do 4 in a row each one may wait for a long time so in total the procedure takes a very long time.

A lot depends on the nature of your pulses, if they all start at the same time but have varying lengths and a 10mS period each pulseIn() reading could take 10mS worst case. If the pulses are not synchronised you can't determine how long things will take.

How long are these pulses?
What is the period of them?
Are they synchronized or independent?

If you really need to offload this job I don't see why a tiny85 couldn't do it, use SPI to return the data. The 85 interrupts the Arduino when data is ready. The Arduino does N SPI.transfer()s to get the data. Clock the 85 using the clock output pin from the Arduino (PB0 or DIG8) so you have accurate timing.

______
Rob
6632  Community / Exhibition / Gallery / Re: Added 29 extra outputs to my Arduino on: May 15, 2011, 09:41:56 pm
Someone was writing a library a while back that interfaced with N shift regs, ie you did something like newDigitalWrite (27, HIGH) and it shifted out the appropriate bits.

You should try to track that down and maybe package it with your board.

______
Rob
6633  Using Arduino / General Electronics / Re: help finding a particular 2 pos. rotary switch on: May 15, 2011, 09:35:06 pm
The best (in fact only) I can find with t quick Google is this

http://au.mouser.com:80/ProductDetail/Electroswitch/E3G0603N-2/?qs=Cey2prYh4C8BxqXJ9E1Rkw%3d%3d

You can get key switches that turn both ways and return to the centre, maybe add a knob to one of them.
______
Rob
6634  Development / Other Hardware Development / Re: ATMEL Mega1284P evaluation board avalible on: May 15, 2011, 09:10:58 pm
RE the SD sockets.

The schematic looks good according to my limited SD knowledge. However the pins on the two sockets are reasonably aligned, yet the rats nest on the PCB shows them all crossed over.

Quote
Not sure what the lines at the left side do,
What lines?

RSV => reserved I think.

PS I responded to your PM with a couple of other comments.

______
Rob
6635  Using Arduino / General Electronics / Re: Killswitch on: May 15, 2011, 10:41:43 am
Can you post a link to your current switch, maybe someone will know of an equivalent.

______
Rob
6636  Using Arduino / Project Guidance / Re: Arduino with shift registers to control 70 devices. on: May 15, 2011, 08:18:37 am
I don't follow.

Presumably you have to remove any 3v3 regulator and either replace it with a 5v version or just poke a 5v wire in to see if it works.

You cannot put 5v on the output of a 3v3 regulator.

If I've got the wrong end of the stick you'd better knock up a drawing.
______
Rob
 
6637  Development / Suggestions for the Arduino Project / Re: Crystal vs. Resonator (Arduino Uno) on: May 15, 2011, 05:46:30 am
Quote
is there any advantage to taking the crystal's output from the 8u2's PC7 pin, rather than directly from the crystal output pin?
I would think so, that's what it's designed for AFAIK. The normal 328 data sheet calls it a "buffered clock output", so it should drive heaps of stuff. I don't have an 8u2 data sheet but see no reason they would be different in this respect.

Quote
My first guess would be that the output wouldn't be enough to drive two clock inputs at once
It would only be driving one wouldn't it? The main processor. And anyway as I said, it's supposed to be buffered.

Quote
you couldn't just connect XTAL1 outputs to the same terminal of the same crystal.
I wouldn't bet on that working but it might. The output of an oscillator is normally just the output of an inverter, however unlike normal inverters it's probably not designed to drive extra stuff but it still might work. Even if it did I think though that this would be a flaky design.

______
Rob

6638  Using Arduino / General Electronics / Re: Killswitch on: May 15, 2011, 05:27:40 am
Yes that would do the trick by the look of it.

However it you're going to buy that why not just buy the correct switch?

______
Rob
6639  Development / Other Hardware Development / Re: How to Make Arduino Compatible Board on: May 15, 2011, 05:23:20 am
If you stick to the supported processors you don't have to do anything software-wise. Just build it and it will work.

If you have non-standard hardware you'll have to modify some of the core files unless you are happy to place a caveat on the board, ie "A0 is used to monitor the VIN level, don't use it in your program" .

You can also add you stuff to the IDE and have it appear on the menu, but I haven't done that so I'll leave it for someone who has.
______
Rob
 
6640  Using Arduino / Microcontrollers / Re: Cheap External Chip Needed on: May 15, 2011, 05:18:06 am
Quote
Using the Arduino is too slow
The Arduino is just an AVR like most others. If you can do it with a tiny13 you can certainly do it with a mega328.

Quote
I probably did something wrong though,
Yep smiley

If you use 4 pulseIn()s in a row

Code:
pulseIn(1,y);
pulseIn(2,y);
pulseIn(3,y);
pulseIn(4,y);
process_results();

you will get consecutive pulses and there will be the inter-pulse delay between each one so the time taken may be quite long. But if you don't mind missing pulses then

Code:
pulseIn(1,y);
process_results_for_1();
pulseIn(2,y);
process_results_for_2();
pulseIn(3,y);
process_results_for_3();
pulseIn(4,y);
process_results_for_4();

Should have a pretty fast response.

Quote
I found something that might work
168 pages of data sheet, what part exactly might work.
______
Rob
6641  Development / Other Hardware Development / Re: ATMEL Mega1284P evaluation board avalible on: May 15, 2011, 03:47:26 am
RE the RS232 connector.

As soon as you have to solder up wires to headers and connectors it looks like a dog's breakfast. Consider the following

a) serial on a DB9 only needs 3 signals on pins 2, 3 and 5.
b) The smallest IDC connector you can get (AFIAK) is 6-way.
c) You have room for a 2x3 header (same as the ISP header).

So I would add the 2x3 header so there is a quick and neat solution to wiring up serial with IDC connectors.

THEN

If there is room. Add a 2x2 header for jumpers so the polarity can be easily swapped.

All in all this allows two Arduinos to be neatly connected with no crappy soldered wires.

______
Rob
6642  Development / Other Hardware Development / Re: ATMEL Mega1284P evaluation board avalible on: May 14, 2011, 08:58:50 pm
Just looking at the extra IO header, the rows aren't .1" spaced.

______
Rob
6643  Using Arduino / Programming Questions / Re: How to always ensure that sensor data is sent out in 3 characters? on: May 14, 2011, 08:56:10 pm
From memory "%03d" will pad with 0s which can be useful.

I'd also add some delimiting characters so you can sync on the data. Getting something like "<002>" makes it much easier to detect errors.

_____
Rob
6644  Using Arduino / LEDs and Multiplexing / Re: Possible to operate a shift register manually with switches? on: May 14, 2011, 08:52:53 pm
Quote
various things are time critical
There's nothing particularly time critical in what you are doing, the only issue is switch bounce as retrolefty said, and that only matters on the clock pin.

______
Rob
6645  Using Arduino / Networking, Protocols, and Devices / Re: using SPI with Parallel LCD display on: May 14, 2011, 08:43:29 pm
The playground has a schematic for the 595 (don't put the .1uF cap on the clock line as they show) that works AFIAK. (can't find a link for it though.)

I did find this.

http://bildr.org/2011/02/74hc595/
______
Rob
Pages: 1 ... 441 442 [443] 444 445 ... 593