Nothing every works exactly the way you'd hoped. We're testing the new ArduPilot boards and it's looks like we'll need to tweak a few more things. One stems from our decision to run the CPU at its top speed, 20Mhz. That's the best way to get maximum performance (it gives us 20 MIPS), but it introduces some incompatibility with the standard Arduino bootloader and libraries, which for legacy reasons run at 16Mhz or 8Mhz.

The usual solution is to recompile the bootloader for 20Mhz and ship the boards with that already loaded (and tweak the way we use clock-dependent libraries), but because this is an open source project that we expect people to modify, this would force DIYers to jump through some pretty gnarly hoops if they want to use libraries affected by clock speed. We could do it anyway and just advise people on what to watch out for, but I worry that it's not user friendly enough (to say nothing of the support and documentation nightmare).

So we're thinking about switching the resonator on the board to 16Mhz to make it 100% Arduino compatible. That's a 20% decrease in computational power, but our code is pretty efficient and will still run fine. Still, it's slightly painful to declock your board, and I suspect that we'll be switching back to 20Mhz as soon as Arduino supports that natively.

(Needless to say, we'll continue to advance ArduPilot at the pace of Arduino overall, which means switching to a 32-bit processor as soon as that''s supported. Arduino is very much designed to evolve with computer technology, so by hooking our wagon to that horse, we're hoping to future-proof ArduPilot.)

Views: 188

Comment by hoopty on September 29, 2008 at 5:53am

I set my SMD board clock fuse to be external in AVRStudio (the last setting at the bottom same as the decimla) and it just stopped working. It was running on internal I believe. Did I blow it or should it have been set that way? If I was right it sounds as if my crystal is not crystaling [:-)'

3D Robotics
Comment by Chris Anderson on September 29, 2008 at 7:34am
What speed is the external crystal (actually a resonator)? If it's 16Mhz, it should be okay (although you need to set the right fuse). If it's 20Mhz, it's more complicated.
Comment by hoopty on September 29, 2008 at 8:08am
it is 20Mhz

3D Robotics
Comment by Chris Anderson on September 29, 2008 at 8:32am
yeah, that's too complicated to sort out. Just switch it back to the internal oscillator and burn the lilypad bootloader.
Comment by hoopty on September 29, 2008 at 8:42am
I wish I could but it won't enter programing mode anymore.
Comment by hoopty on September 29, 2008 at 8:42am
new chip?

3D Robotics
Comment by Chris Anderson on September 29, 2008 at 8:48am
I think that what's happened is that it's looking for a different kind of external crystal/resonator than you've got. If you can remember which setting you chose, you can probably wire up the right crystal with wires that you can put on the right pins long enough to program it back to the internal oscillator.

Failing that, a new chip will do the trick. In the future, just do all the testing and prototyping on the internal oscillator (ie, leave the fuse as it is). It's just 50% of normal power, but that's sufficient for our code.
Comment by hoopty on September 29, 2008 at 9:25am
Is a scope going to put too much load on the chip leg to measure frequency? I only have 10x scope leads to they may be a bit heavy

3D Robotics
Comment by Chris Anderson on September 29, 2008 at 9:39am
No idea, I'm afraid.
Comment by DIY-Guy on September 29, 2008 at 1:58pm
Thanks for trying to keep the ArduPilot board compatible with Arudino/Boarduino. I've purchased the other parts already and am looking forward to the completed pilot board. You're thinking along very clear and "user-friendly" lines, keep it up Chris! :)



You need to be a member of DIY Drones to add comments!

Join DIY Drones


Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service