Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 15
61  Products / Arduino Due / Re: malloc problem on AVR, Arduino 1.5.2 on: March 15, 2013, 03:47:55 am
I also looked on github. deleting that file is basically a non-answer. What needs to happen is there should not be two pieces memory management code. It has to be one or the other, and not both.
May with some define lines it can be solved
62  Products / Arduino Due / Re: Composite Video Generating on: March 10, 2013, 01:56:05 pm
I have it connected to my scope too (which has 1M impedance).
I'm right yo you must have all parallel connected, so the smalest resistor will beat all other if you connect it and messure the impedance value you will get ~75 Ohm even with the 1M impedance. God will be an operational amplifire as voltage follower between the DAC and the rest of the connections or something else how has an high input impedance and an low output impedance.
63  Products / Arduino Due / Re: arduino due rtc and unixtime ? on: March 04, 2013, 03:45:02 am
I'm sorry i forgot to give you karma until today so i will have to keep giving you karma now for helping me. smiley-mr-green

I have already done this in a much dirtier way by  adding six years worth of seconds to the line in rtc_clock.h #define SECONDS_FROM_1970_TO_2000 946,702,800.  I like yours better though, cleaner and works for everybody.  I will install and test.

You know, this has me thinking...  I never checked the unixtime from my old sketch (which i ran on uno w/ DS1307 rtc).  I wonder if it was accurate because it didn't have a way to put the timezone in afaik.  oh well.. i'm too lazy to check because the old project is now a heap of crap in the garage because hurricane sandy knocked my power out for 17 days and the entire aquarium died and it started to reek of low tide. anyways, enough babbling..  kudos!

edit:  It does seem to be working perfectly now...  karma ++ for you..  as soon as i can again because it says i cant do it more than one time per hours.

Sorry for your lost, bad sandy.

Thanks for the karma. So new version only ready for Summertime  smiley
64  Products / Arduino Due / Re: arduino due rtc and unixtime ? on: March 02, 2013, 03:07:58 pm
So tevroc I have make some changes in the rtc_clock.unixtime() function as I had to find out that not all people live in my timezone so you can change it, you can insert rtc_clock.unixtime(UTC-5) or some else UTC+1230 or other known timezones to make an addoption to your time zone.

New one attached please test if I shift in the right direction.
65  Products / Arduino Due / Re: Updating 16u2 USB firmware on: March 01, 2013, 11:58:39 am
All right, working much better now with new USB firmware https://github.com/arduino/Arduino/pull/1267#issuecomment-14058478

Yes much better voll agree, the page for upgrading the Atmel16u2 is really nice but I think I would better and nicer for beginner that there would an Name for the Programming Port Atmel in the Boardslist so that anyone can change the firmware easily from the IDE
66  Products / Arduino Due / Re: arduino due rtc and unixtime ? on: March 01, 2013, 11:08:33 am
The example did not compile at first.  Then i realized it was using the old header file from the other folder for some reason.  after uninstalling your old library, it worked!  thanks again!   smiley-money

edit: upon further inspection something is off.  The unix time stamp that the example gives is off by a few hours.  i used a couple of different websites to verify this.  

http://www.epochconverter.com/
http://www.unixtimestamp.com/index.php

its giving me
Code:
Unixtime: 1362130550
And in plain for everyone
Time: 10:35:51
Date: Fri 01.03.2013

but if you punch that timestamp into the converter it gives you
Code:
TIME STAMP: 1362130550

DATE (M/D/Y @ h:m:s): 03 / 01 / 13 @ 3:35:50am EST

Whats your timezone?

Convert epoch to human readable date and vice versa
1362130550   [batch convert timestamps to human dates]
GMT: Fri, 01 Mar 2013 09:35:50 GMT
Your time zone: Freitag, 1. März 2013 10:35:50 GMT+1

Come from the first link.

Sorry it's german but on this page you can change the timezone http://www.aritso.net/aritso-tools/timestampconverter/ and you will get other times for the unixtime
67  Products / Arduino Due / Re: arduino due rtc and unixtime ? on: March 01, 2013, 08:42:23 am
WOW!   smiley  What fast service!  Thank you!  I would definitely like to try it but i have to leave for work.  I will try it tonight when i get home.
No not for that, I needed an reason to get an hand on it thanks, it's my pleasure if someone used it, btw there is an new version online.
68  Products / Arduino Due / Re: arduino due rtc and unixtime ? Update to the Update on: February 28, 2013, 05:32:25 am
Did you have a link to the Adafruit library if I find some time I will convert it. It's my fault I hadn't any use for the unixtime so i don't implement it sorry...

So the use of the compiletime is implemented, sort of this to use it:
Code:
 rtc_clock.set_time(__TIME__);
  rtc_clock.set_date(__DATE__);
re-used the code from Lady Ada, unixtime will be the next.

So unixtime implemented like the Adafruit library solved the problem:
Code:
rtc_clock.unixtime()
gives you the time in unixtime style.

Sample and Updated code will follow...

And now completed.

Sample for this:
Code:
#include <rtc_clock.h>

// Select the Slowclock source
//RTC_clock rtc_clock(RC);
RTC_clock rtc_clock(XTAL);

char* daynames[]={"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"};

void setup() {
  Serial.begin(9600);
  rtc_clock.init();
  rtc_clock.set_time(__TIME__);
  rtc_clock.set_date(__DATE__);
}

void loop() {
  Serial.print("Unixtime: ");
  Serial.println(rtc_clock.unixtime());
  Serial.println("And in plain for everyone");
  Serial.print("Time: ");
  digitprint(rtc_clock.get_hours(), 2);
  Serial.print(":");
  digitprint(rtc_clock.get_minutes(), 2);
  Serial.print(":");
  digitprint(rtc_clock.get_seconds(), 2);
  Serial.println("");
  Serial.print("Date: ");
  Serial.print(daynames[rtc_clock.get_day_of_week()-1]);
  Serial.print(" ");
  digitprint(rtc_clock.get_days(), 2);
  Serial.print(".");
  digitprint(rtc_clock.get_months(), 2);
  Serial.print(".");
  Serial.println(rtc_clock.get_years());
  Serial.println("");
}

void digitprint(int value, int lenght){
  for (int i = 0; i < (lenght - numdigits(value)); i++){
    Serial.print("0");
  }
  Serial.print(value);
}

int numdigits(int i){
  int digits;
  if (i < 10)
    digits = 1;
  else
    digits = (int)(log10((double)i)) + 1;
  return digits;
}

New library is attached, tevroc would you like to test it.
69  Products / Arduino Due / Re: Due I2C not working on: February 27, 2013, 01:34:06 am
Actually, it's my code which was bad, I modified it and all worked fine for me smiley Sorry for disturbing.
It would be nice if you share your new code with us.
70  Products / Arduino Due / Re: Do not follow Simple Audio Player example - DAC0 now non-functional on DUE on: February 26, 2013, 02:37:33 pm
DAC0 is the one you learn on, DAC1 is the one you then take care of.

Duane B

destructive testing  smiley-confuse
71  Products / Arduino Due / Re: I/O loading on Due on: February 14, 2013, 04:35:31 am
does it only refer to TST, ERASE and JTAGSEL select pins ?
In reference to the Atmel paper I would say so only on this pins
72  Products / Arduino Due / Re: OneWire in Due on: February 13, 2013, 05:40:05 am
Interrupts are disabled for a very good reason.  There's absolutely no way OneWire will return to the buggy pre-2.0 days where interrupts could lengthen the timing and cause random communication errors.
Ok, I understand that (I do know what are interrupts for and why they are disabled in time critical sections). I do not understand why delayMicroseconds acts differently depending on interrupts being disabled or enabled. Declaration of delayMicrosections for SAM is quite simple (from wiring.c):
Code:
void delayMicroseconds( uint32_t us )
{
    uint32_t start = micros();
    while ((micros() - start) < us)
        ;
}
It did not change since 1.5.1r2.

Do you have an idea, what the solution could be?

Leo

PS if I can contribute in any way, let me know.

So the problem must be somewhere behind the micros the function delayMicroseconds is realy open so the problem musst be somewhere there

Code:
uint32_t micros( void )
{
uint32_t ticks ;
uint32_t count ;

SysTick->CTRL;
do {
  ticks = SysTick->VAL;
  count = GetTickCount();
} while (SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk);

return count * 1000 + (SysTick->LOAD + 1 - ticks) / (SystemCoreClock/1000000) ;
}

its in the wiring.c
73  Products / Arduino Due / Re: Building a CAN communication protocol interface for Arduino DUE on: February 02, 2013, 09:10:31 am
They explained to me that if we include any ASF based file in the project, there will be needed to add thousand others. I know you did a great job with your RTC Library but in the case of the CAN class, more references need to be considered.
Thanks for the laurels, but the RTC stuff isn't as half as big as the CAN stuff you did and btw. there was an "component_rtc.h" file that was waiting for me and begged me to make an userfriendly (under arduino law-standing) Library. For you there was nothing from arduino to work above it.
74  Products / Arduino Due / Re: Building a CAN communication protocol interface for Arduino DUE on: February 01, 2013, 02:18:11 am
Hola Lufe.

Your CAN experience will surely be very useful. As I mentioned in my first CAN post, my humble role is to channel the efforts to let the CAN API be completed. So far, I must say, it has been more a behind-the-forum work between Arduino, Atmel and me. Tests are in progress; the CAN library is working using the IDE directly (no makefile) and we are close.

From all of this, we have learned a big lesson: DO NOT (I repeat) DO NOT try to build something from Atmel Studio ASF and introduce it into Arduino. Both software architectures are entirely different and it shall be a pain to remove unneeded references. This experience is helping us to understand better how to create a Due library. The updated libsam will be solid ground for future developments for Due.  Saludos!
Some good news some bad news, good to hear but can you explain the part from "Not trying to port Atmel Studio ASF to Arduino Software architecture a little bit more for me for better understanding.
75  Products / Arduino Due / Re: Arduino due + SPI setClockDivider() function on: January 31, 2013, 04:25:03 am
Hello,

Firstly, I use an unofficial ethernet shield (with W5200 chip) with the new arduino due.

I modified the W5100 library for the W5200 chip and all the exemple sketches run very well.

Witch one?
Pages: 1 ... 3 4 [5] 6 7 ... 15