Show Posts
Pages: 1 ... 446 447 [448] 449 450 ... 582
6706  Using Arduino / Interfacing w/ Software on the Computer / Re: Interrupts. on: April 24, 2011, 06:42:12 am
The serial funcs are already interrupt-driven.

Quote
i don't want to use loops to check data.
Maybe you should tell us why, because otherwise you'll have to write a custom buffering function which is almost certainly more trouble than it's worth.

______
Rob
6707  Using Arduino / Programming Questions / Re: Need help with graphical LCD library and PROGMEM on: April 24, 2011, 06:36:30 am
AFAIK you can't reference the PROGMEM array directly, ie

LCDA.DrawFullScreen(logo);

There are macros to to this but I can't remember right now what they are. I'm sure if you Google PROGMEM you'll find examples.

BTW, why do you have 'S', 'T', 'A', 'R', 'T' and 'E', 'N', 'D' in the array.

______
Rob
6708  Development / Suggestions for the Arduino Project / Re: How many millis() takes a delay() on: April 24, 2011, 06:25:31 am
Quote
equal or longer than 5000 millis for ANY crystal value
It is very close to equal if you set the appropriate number in whatever file deals with this, (boards.txt?)

Quote
the delay() and millis() aligned in a way it will not be dependant on the crystal frequency
These simple delay functions are based on the clock frequency, so they can't be independent of it. The only way to get an accurate and independant frequency would be to have another (normally external) clock source.

______
Rob
6709  Using Arduino / Interfacing w/ Software on the Computer / Re: Sending SPI data with Arduino as slave on: April 24, 2011, 05:40:21 am
AFAIK you cannot use the SPI library function as a slave.

Quote
As a slave you cannot provide the clock, the master must do that by sending marker characters such as nulls.
No, the clock is independent of the data with SPI, it's a separate signal.

The way most people do it I think is to "sacrifice" the first byte. ie the first master SPI.transfer returns whatever crap was in the slave's output register (SPDR). You then have to do another one to get real data.

One problem with the AVR implementation of SPI is that there is no buffering, so even if you tie SS to a slave interrupt unless the master adds some delays the slave is not fast enough to put data in the SPDR before the master starts to shift it out.

I do have an example of a slave ISR that does this but I'll have to remove some junk that's specific to my application. If you want I can do this and post it.

______
Rob

6710  Using Arduino / Microcontrollers / Re: Datasheet for Atmel148/Atmel146 = 8-pin ic? on: April 23, 2011, 09:34:32 pm
I've never heard of such a beast, but did you check at the Atmel site?

______
Rob
6711  Using Arduino / Interfacing w/ Software on the Computer / Re: Sending SPI data with Arduino as slave on: April 22, 2011, 11:15:21 am
Receiving is not that hard but there are some tricks, for example the master has to insert some delays to give the slave time to respond.

Have a look at Nick Gammon's site (http://www.gammon.com.au/forum/?id=10892) for a good tutorial.

______
Rob
6712  Using Arduino / General Electronics / Re: Power for a few more seconds after disconnect on: April 22, 2011, 07:09:11 am
Bloody heck, why not just use a truck battery smiley
6713  Using Arduino / General Electronics / Re: Power for a few more seconds after disconnect on: April 22, 2011, 06:35:17 am
So what size cap is this?

______
Rob
6714  Using Arduino / General Electronics / Re: Power for a few more seconds after disconnect on: April 21, 2011, 08:57:22 pm
Rugged Circuits states a method of detecting the power out with no external components which should work.

Alternatively as Nick says, organize an input from "upstream" of the diode.

______
Rob
6715  Development / Other Hardware Development / Re: Arduino product production on: April 21, 2011, 07:49:49 am
Yeah, Terry knows about the project.

______
Rob
6716  Using Arduino / General Electronics / Re: Resettable circuit on: April 20, 2011, 08:27:44 pm
I can't get my head around all the ons and offs, but a D-type FF would do this I think.

sensor -> CLK
5v -> D
pushbutton -> RST
output -> Q or \Q

Let's stay with positive logic to make life simpler.

Whenever the sensor goes high it will clock the FF thus causing the output to go high. This output will stay high forever or until the button is pressed, at which time it will go low.

D-type FFs have a Q and /Q outputs so you can choose which logic suites the app.

Note JK flip flops will probably do the same thing, but I find Ds easier to think about. Also the sensor output may have to be sharpened up with a schmitt trigger or something, depends on the sensor type.

______
Rob
6717  Using Arduino / Programming Questions / Re: How to use windows .bat file instead of serial monitor? on: April 20, 2011, 07:57:30 pm
A nice bit of retro programming smiley

Does that send 5 or "5"?

Is there a trailing \n\r that stuffs up the Arduino?

______
Rob
6718  Using Arduino / Programming Questions / Re: Problem using NewSoftSerial on: April 20, 2011, 09:20:41 am
Another thought, this

Code:
digitalWrite(txPin2, HIGH);
  digitalWrite(txPin2, LOW);

will produce a pretty small pulse, the Picaxe "interrupts" are really polled aren't they, will the 08 recognize it? What about trying a small delay() between the HIGH and LOW to make sure.

______
Rob
6719  Using Arduino / Programming Questions / Re: Problem using NewSoftSerial on: April 20, 2011, 09:17:41 am
Quote
sertxd command and 'The baud rate is fixed at 4800,n,8,1
Quote
so I have to use the serin command which maxes out at 4800.

You're using an 08 so doesn't this mean 4800 both ways?

Have you verified that the string passed to PICAXE08M_MC_Print is correct?

Is 2mS enough for the 08 to process the character and 8mS enough to get it's attention? (I would think so but you never know)
______
Rob
6720  Community / Bar Sport / Re: Trebuchet on: April 20, 2011, 08:52:10 am
Jeez you know how you never see a yellow VW Beetle then all of a sudden you see them all over the place. Well now everywhere I go I see trebuchets.

http://www.kickstarter.com/projects/1803756771/trebuchette-the-snap-together-desktop-trebuchet?ref=spotlight

And get this, he's got backing for over $66,000 to build them.

______
Rob

Pages: 1 ... 446 447 [448] 449 450 ... 582