Show Posts
Pages: 1 2 [3] 4 5 ... 42
31  Products / Arduino Due / Re: Change the Sine wave frequency on: June 08, 2014, 08:24:20 am
FWIW, ARM Cortex-M3 has a 2-cycle hardware divide instruction for unsigned 32 bit integers.  The compiler is pretty crafty about using divide then subtract to quickly compute integer modulus.  There's little speed benefit to redesigning for a power-of-2 division or modulus.

On 8 bit AVR, integer division is a terribly slow operation, involving a function call to code which loops 32 times, shifting and subtracting (a.k.a. "long division").  When Arduino Zero becomes available, the same will be true, because the Cortex-M0+ lacks hardware divide.

Only the M3 & M4 versions have the fast integer divide instruction.  Arduino Due is based on the Cortex-M3.
32  Development / Other Software Development / Re: Mods to HardwareSerial to handle 9-bit data on: June 04, 2014, 04:48:10 pm
I guess the version I published for Teensy 3.1, based on Nick's code, but with changes to use Arduino newer Serial.begin(baud, format)... isn't going to help you much.
33  Development / Other Software Development / Re: Mods to HardwareSerial to handle 9-bit data on: June 04, 2014, 11:02:41 am
Which board are you using?
34  Products / Arduino Due / Re: Small-footprint Due on: April 29, 2014, 03:12:41 am
A fraction of the size of the original, with an estimated price, where you have not to think about letting the board in a project.

As someone who makes ARM-based Arduino compatible boards (but not with Atmel SAM3), I'm curious what price point you'd consider low enough to just leave the board in a project?
35  Products / Arduino Due / Re: Encoder driver steeper motor for DUE on: April 18, 2014, 11:37:59 am
_delay_us was already commented out and replaced with delayMicroseconds.  It will probably compile if you simply remove that #include line.

In general, when porting C/C++ code, when some #include is missing, usually the very first thing you do is just comment it out and try compiling.  Then all the stuff that .h file defines, that isn't defined because you removed the .h, will become errors.  If you're lucky, they'll be simple thing things you can find a way to replace.  In this case, looks like someone already replaced the one thing that probably comes from that .h.

But one other thing you'll need to change is the numbers in those attachInterrupt lines, because the numbers work differently on Due.  Arduino has a "reference" section of the site, where you can find documentation on how attachInterrupt works.  You should find that page and read it to understand what to do. 
36  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: April 16, 2014, 07:13:25 am
I must works well and it must work guaranteed. :-)

Do you realize you're asking for a guarantee on free software written by unpaid volunteers?

What if it doesn't work?  Will you need a refund?
37  Products / Arduino Due / Re: Due compatible Time library? on: April 10, 2014, 01:24:32 pm
Simple solution is don't use Due but rather Teensy 3.x instead.  smiley-wink

Yes, of course, but when posting on Arduino's forum, I generally try to avoid plugging my own products too heavily.

Both Arduino Due and Teensy 3.1 have a built-in RTC, but things are implemented things quite differently.  Both boards have a place for the 32 kHz crystal.  I believe Due now ships with the crystal.  On Teensy 3.x, you have to add it.  Due has no easy way to add a battery and Due has its reset signals connected in such a way that the RTC time is not preserved through a hardware reset, which is a very unfortunate design decision that makes Due's built in RTC nearly useless.  On Teensy 3.1, there's a pin to add the 3V coin cell.  Teensyduino automatically initializes the RTC with your compile time if it's not already running, so things "just work" very nicely, and of course the time is preserved the way you'd expect from a RTC, through hardware resets and reprogramming.

Here is an option that I think is pretty good that is about the best that can be done
without the major headache of actually changing the object name or requiring the user
to declare the object.

Would you like to take over maintaining this library?  The position is open, but it doesn't pay very well.....

(Why the Tiny library deviated so much is beyond me....)

I agree.  I saw a comment on Adafruit's site about a desire to make the differences from regular Wire clearer.  That sounds amazingly similar to the thinking behind several of Arduino's least popular design decisions.

I believe the keepers of Trinket and other ATTINY-based boards could easily change course, and probably still maintain compatibility with all the stuff that's been built up around "TinyWire", by making a Wire.h that includes the old and supports both names using macros, inherited classes, or some other approach.  Like so many things, the technology isn't terribly difficult, if you have the will to make it happen.  I'm pretty sure they will come around someday....  In the meantime, I'm not planning to add "TinyWire" support to any libraries I maintain.  If they want to make things "just work" with the huge number of libraries build on top of Wire.h, they can.  It's really that simple.

My philosophy is similar for Arduino Due, Intel Galileo and of course Teensy 3.x.  We're all making boards outside the well worn path of ATMEGA328.  But how (or even whether) we handle these compatibility issues is a matter of choice.

I personally make Teensy's compatibility a high priority, to the point where I end up maintaining lots of the abandoned Arduino libraries.  Often, in cases such as this DS1307RTC libraries, I end up fixing issues for the other boards that people buy instead of Teensy.  Maybe that's not the smartest move on my part?

38  Products / Arduino Due / Re: Due compatible Time library? on: April 10, 2014, 04:47:51 am
.... RTC, that's way too generic. What if I rant to use it for Rob's Timer Counter smiley

I'll look forward to trying out the Rob's Timer Counter library.  I'm sure it'll be awesome!  smiley-wink
39  Products / Arduino Due / Re: Due compatible Time library? on: April 10, 2014, 04:35:33 am
lots of "ugly" global #define names in that header file.

Yes, that is particularly ugly.  I expect a small and consistent amount of this from Arduino's core library, but not from headers supplied by the semiconductor companies!

If this were Teensy, I'd edit that file.  But of course, being Arduino Due, it's really a matter for the Arduino Team to address.  Somehow I do not believe they'll have much appetite for editing "system" headers from Atmel, but maybe someone ought to file a bug report anyway?

Although as a temporary kludge/fix you can edit DS1307RTC.h and insert this line:

I've applied the kludge to the DS1307RTC library.  This page has the updated code.

Like I said this is a temporary kludge and I'm not really sure how to fix
it properly without renaming the library's global RTC object.

Agreed, but that's more work than I intend to put into this library to support Arduino Due.

Like many other libraries, I sort-of maintain this one.  Michael Margolis hasn't completely abandoned it, but he's insanely busy.  Of course, if he wants to get involved, I'll sync to whatever he publishes.  I'm pretty crazy busy with a lot of Teensy-related stuff, so this is about as much as I'm willing to do.

If anyone wants to step up and become a more active maintainer of this library (and/or many others), the job is open....
40  Products / Arduino Due / Re: Due compatible Time library? on: April 09, 2014, 01:24:44 pm
Try the Time library from this page

The beta copy from reply #6 is old.  Do not use it.  I have removed it from my server, so that link should no longer work.
41  Products / Arduino Due / Re: Due compatible Time library? on: April 09, 2014, 01:11:29 pm
Did you try either of my 2 suggestions?
42  Products / Arduino Due / Re: Due compatible Time library? on: April 09, 2014, 12:47:09 pm
Could you try using both Time and DS1307RTC from the PJRC site?  Maybe you've got an older version?

If that doesn't work, could you also try those 2 with Arduino 1.5.2?  Maybe something has changed since they were tested on 1.5.2?
43  Products / Arduino Due / Re: PROGMEM Issue I read all other PROGMEM posts on: April 05, 2014, 09:39:32 am
You can't read flash memory at all, you can only execute
it as code, this is a basic security measure on the chip.

Are you sure about that?
44  Products / Arduino Due / Re: DUE PWM Frequency on: March 30, 2014, 10:28:11 am
Even if these things are difficult or impossible today and here on this forum, they may not always be so unattainable always and everywhere.

Incomplete, time-wasting questions are a huge problem on every forum that tries to offer support for novices on technical platforms.  As the technology becomes more advanced and even more absolute beginners enter the community, it's an ongoing problem that's becoming more and more worthy of difficult work to customize forums.

Of course, as the creator of Teensy, I'm interested in trying to improve the PJRC forum.  I'm also interested in sharing these types of improvements, just like I try to contribute Teensy's improvements back to Arduino (which is another excellent example of something that isn't always easy or even possible, but still worth trying).  Helping beginners is something I care about doing.  Every day I answer lots of questions.  Every day, I waste time asking people to post info they should have put in their original question.  Every day, I see conversations that would have produced useful or more relevant answers if only the question had included better info.

Even if the ideas get tried first on my own forum, or any of the many other forums for various arduino-compatible boards, I think it's worthwhile to brainstorm ideas.  Even if they're "hard" in the context of today's forum software, in the long term some way to improve is needed.

Things will only get better if someone tries.  I know I want to, even if I have to dig into thorny forum customization/programming.  I'm really interested to hear any ideas of how forums could guide novices to ask better questions, so they get better answers and everyone's time is wasted less.  Even if those ideas seem impossible on today's forum systems, time, persistence and ingenuity have a way of making anything possible in the long run.
45  Products / Arduino Due / Re: DUE PWM Frequency on: March 22, 2014, 01:09:05 pm
You did not answer my question.

I want to improve how new people, like you (only days ago), see forums *before* posting their first question.  If you had known this before writing all those questions, you could have received better answers and avoided wasting so much time from the most knowledgeable and helpful people.

The question: how can these forums help new people, like you, to post better questions?

Please, consider you have consumed so much time from so many people.  The least you could do is offer a little help to improve the process for everyone in the future.

What could have shown you, only a few days ago, how to ask a better question *before* you wasted everyone's time?
Pages: 1 2 [3] 4 5 ... 42