Show Posts
Pages: 1 ... 3 4 [5] 6 7
61  Community / Exhibition / Gallery / Scripted Arduino GPS Simulator on: March 13, 2012, 08:50:56 pm
Here are some of the program’s features:
  • Configurable update rates: 1, 5 and 10Hz.
  • Outputs NMEA RMC Sentences (can easily be converted for others).
  • Uses Arduino DataFlash Library to run a “scripted” course and speed.

Program can be found here.
62  Using Arduino / Programming Questions / Re: Function() vs Speed on: March 11, 2012, 12:57:42 pm
The evidence is in numerous books.  My experience working with assembler dates back to the early 80's with 6502 and Z80.  

You only have a limited number of registers, when you run out of registers, this doesn't mean you can't call any functions, it simply switches to the stack.  Go read some books or search online.

Like-wise, if you nest to many function calls you will run out of stack space and encounter a stack overflow.

Quote
If too many, those that don't fit are passed on the stack.

As suspected, your statements are generalized comments about compiler functionality and not specific to gcc, avr and arduino. I would suggest using the disassembler in AVRStudio to evaluate the specifics of a particular function call.

My experience also dates back to the 1980's and the 6502. A copy of Principles of Compiler Design is in my library.
63  Using Arduino / Programming Questions / Re: Function() vs Speed on: March 11, 2012, 12:36:27 pm
Registers are only used when available which depends entirely on what else the CPU is doing at the time, at all other times the stack is used, so you should not rely on the use of registers, but you should factor the stack into your operation as this is the worst case senario.

Quote from: avr-libc FAQ
Function call conventions:

Arguments - allocated left to right, r25 to r8. All arguments are aligned to start in even-numbered registers (odd-sized arguments, including char, have one free register above them). This allows making better use of the movw instruction on the enhanced core.

If too many, those that don't fit are passed on the stack.

My experience and the FAQ states the opposite of what you state. Can you provide evidence to support your statement?
64  Using Arduino / Programming Questions / Which Arduino Processor is My Code Running On? on: February 23, 2012, 12:11:09 pm
Need to determine which Arduino processor your code is running on? Simply access the signature bytes.
65  Using Arduino / Programming Questions / Re: Assembly generated code on: February 21, 2012, 04:17:54 pm
Windows instructions can be found here.
66  Community / Exhibition / Gallery / arduino IR Lap Timer on: February 20, 2012, 01:21:54 pm
IR-based Lap Timer suitable for cars, karts, motorcycles and bikes.
Utilizes an AIM IR Beacon Transmitter, but project site has information on how to make your own beacon.
Project information, including video demonstration, schematic and source code is located here.
67  Using Arduino / Displays / Sample code for inverting 4-digit 7-segment display on: February 12, 2012, 04:39:22 pm
Go from this:


To this:


Demo and explanation on my blog here.
68  Using Arduino / Project Guidance / Re: Binary Clock - using RTC on: January 24, 2012, 11:59:15 am
I doubt this call will work inside an interrupt:

Code:
DateTime now = rtc.now();
69  Using Arduino / Project Guidance / Re: Lap Timer on: January 10, 2012, 05:57:39 pm
Rob - nope, I'd never even heard of XBEE until now - I could use two of them on one Arduino?

Chagrin - I have 2 AiM IR Beacon Transmitters, model TL0600 - http://www.magnaracing.com/index.php?main_page=product_info&products_id=2001

and 2 receiver breakouts - http://www.sparkfun.com/products/8554

Thanks for your help!

I have built lap timers that are internal to the vehicle using Arduino and the AIM beacons you reference. But it seems you want the timer to be outside of the vehicle, stationary. Is that correct? If that is the case, you don’t need the AIM beacons.  Please clarifiy.
70  Using Arduino / Programming Questions / Re: Computing the Time it takes for indivdula instructions to excute? on: September 03, 2011, 11:21:13 am
1. count cycles

2. run code in avr studio simulator and use the stopwatch

3. http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1175115259



71  Using Arduino / Programming Questions / Re: Atmega Assembler on: June 16, 2011, 12:40:49 pm
May I suggest, "Programming Microcontrollers using Assembly Language"  by Chuck Baird.
72  Using Arduino / Microcontrollers / Re: PIC vs AVR? on: June 15, 2011, 11:53:58 am
Once you understand the arduino, it's not a big leap to start programming AVR chips with an ISP and AVR Studio.
73  Topics / Science and Measurement / Re: accessing adc at faster rate on: May 16, 2011, 09:50:33 am
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208715493/11
74  Using Arduino / Microcontrollers / Re: Pin change interrupts on arbitrary pins? on: March 20, 2011, 02:16:26 pm
afaik, only 2 pins for interrupts on 8/168/328 arduinos, however, more pins are available on the mega based boards. you would need to hardcode the interrupts, and i'm not sure if doing that would break any other functions.

something like this worked for me:

Code:
ISR(PCINT0_vect) {
  …
}

Setup() {
  //disable interrupts
  cli();
  
  //setup digital pin #8 pin-change interrupt (see datasheet)
  PCICR |= (1<<PCIE0);
  PCMSK0 |= (1<<PCINT0);
 
  //enable interrupts
  sei();
}
75  Using Arduino / Programming Questions / Re: Arduino as a chronometer ? Know what you are doing ! on: March 06, 2011, 10:55:27 am
update?
Pages: 1 ... 3 4 [5] 6 7