Go Down

Topic: GATOR : New Board (Read 8687 times) previous topic - next topic


Jul 17, 2009, 04:11 pm Last Edit: Jul 17, 2009, 04:15 pm by mem Reason: 1
I don't think there's anything preventing other Arduino  boards from running at 20 MHz. It should just be a matter of popping off the 16 MHz crystal and replacing it with a 20 MHz one.

The core hardware libraries are pretty well parameterized based upon the definition of F_CPU (CPU frequency) in the compilation process.

Although code may be parameterized based upon the definition of F_CPU, there will be things that break, particularly code that uses the hardware timers. For example, MegaServo calculates the number of timer ticks per microsecond as follows;
#define TICKS_PER_uS     (clockCyclesPerMicrosecond() / 8)  // number of timer ticks per microsecond with prescale of 8

On a 16MHz board there will be two ticks per microsecond, 8MHz has one tick per microsecond. The problem is a 20MHz board will also use two ticks because you can't have fractional ticks and the calculation rounds down. This means that if you run the current MegaServo code on a 20MHz board the pulses will be 20% shorter then they should.

This issue is fixable by adding in a fudge factor to the functions that convert to and from microseconds, but that has not been necessary so far and its not in the current code. BTW, the Arduino team is planning to use the MegaServo code in an upcoming release

The existing official arduino servo code does its calculation differently so that may be ok (but should be tested to make sure) but that code does not run on the Mega

Other code that uses hardware timers may also not run as expected, although things like a 20% error in PWM frequency may not matter in most applications.

There has been some discussion in the Arduino developers thread about optimizing the millis calculation using code that assumes the CPU frequency is evenly divisible by 8, but not sure if that will be released or not.

Anyway, don't assume that everything will work the same even if the code is parameterized with the clock frequency.


That's good info...thanks.

The nice thing about this Arduino community is that it doesn't seem like progress is held back by the chains of compatibility. "If it's broke, fix it" is a much nicer way to travel.


Impressive board!

Erm...this may be a stupid question, but does the Gator access its 2nd UART the same way the MEGA accesses one of its?  In other words, is that 2nd UART supported when using the arduino software?


Yes, it uses a Serial1 object in addition to the Serial object to access the second hardware serial port, just like the Mega uses Serial1, Serial2, etc.

That support is not in the 0016 release of the Gator Arduino tools but will be in 0017. It just requires a small patch to the HardwareSerial.cpp/.h files in the hardware/cores/arduino directory. If you're really impatient you can download the patched files from http://www.ruggedcircuits.com/Arduino/serialpatch.zip.


Jul 22, 2009, 02:38 am Last Edit: Jul 22, 2009, 02:40 am by ArduinoAndy Reason: 1
What is the "idle current draw" on the Gator?
The 168/328 has about 20 ma. and I believe the Gator has just
a little more due to the 4 MIPS speed increase (20 MHZ) and 28 I/O.
:) :) :)
"Never trust an Internet bully who insults and makes fun of your level of intelligence."


It's about 30mA externally powered. I don't know what it is on USB power (kinda tough to measure).


is that with all pins not set? as in all digitals untouched in the program or with all of them set to low (or whatever the most efficient setup was, i can't find that topic ATM)?


It is with all pins configured as inputs with pullups. But I don't think the I/O pin configuration makes much difference to current consumption.


Is there a plan to ship overseas yet?  If so, when, please?  I will want one initially in Belize.


There is no plan yet to ship outside of the US and Canada, although that is definitely a longer-term goal.


Jul 23, 2009, 06:14 pm Last Edit: Jul 23, 2009, 11:39 pm by ArduinoAndy Reason: 1
Recommended Rugged Circuits Gator Pullups/Pulldowns?

On circuits A & B without current limit resistor R1 and the I/O pin set as "output" (by accident or on purpose)  A High for A and LOW for B and activating SW1 on you could lose your I/O pin and maybe the chip. Installing R1 current limits the I/O.

The Gator's I/O pins have a 510 ohm current resistor and 5.1 V zener for ESD, overvoltage protection and current protection built in their printed circuit board.

Since the Gator's protection is built in, in circuits C & D will my pullup and pulldown circuts be OK on the Gator? Note: The internal weak pullups are not used.  

8-) 8-) 8-)
Re-edited 17:38 8/23/09

"Never trust an Internet bully who insults and makes fun of your level of intelligence."


Jul 23, 2009, 07:09 pm Last Edit: Jul 23, 2009, 07:12 pm by EmilyJane Reason: 1
So, the Gator's digital out drive is limited to around 5 mA when sourcing current to a TTL level load and somewhat less when sinking current?

Is there direct access to the i/o pins via some sort of convenient header as well? It's not clear to me from your website that the pads brought to the board topside are unprotected.


@ArduinoAndy, yes your pull-up/pull-down arrangements are correct.

@EmilyJane, the current is indeed limited, as documented here.

There is no direct access to I/O pins. The pads brought out topside are on the "protected" side of the circuitry.


Thanks for that clarification.

@ArduinoAndy, yes your pull-up/pull-down arrangements are correct.

I'm dumb, I can't figure out how that zener pulls the input down. Can you explain it?


The zener does have a small amount of reverse leakage current, enough to bleed off any accumulated charge.

Go Up