Show Posts
|
|
Pages: 1 ... 3 4 [5] 6 7 ... 13
|
|
61
|
Products / Arduino Due / Re: Lin Support on the Due
|
on: December 11, 2012, 02:29:54 pm
|
Hi folks,
I get in some serious trouble porting the Lin example from the Atmel Framework. Some parts of the Lin example works on the USART0_Handler and the problem is the Handler is allready defined on the variant.cpp.
I try to integrate it without break up parts in the existing files. I can reuse easily the pdc, lin and usart files frome the example and itegrate them in the Arduino IDE, but the Interrupt makes me cry.
Can some one lend me an helping hand for this.
Best regards
Markus
So folks, I have ported all nessecary files from the LIN_MNGT_EXAMPLE for the Arduino, I get it so far that it compile without any errors. I will test it on an Lin Master when I get one. One problem left I can't handle the UART0_HANDLER by define them out in the variant.cpp and de/activate him in the sketch. the variant.cpp is handled first by the compiling. Comment it out is not the fine art of doing it. Are there other ways of getting this in the right way. Next step cleaning the files up. B.R. Markus Btw. I missed functions to enable and dissable the Interrupts in the tc.c
|
|
|
|
|
63
|
Products / Arduino Due / Re: TFT library compatible with Due?
|
on: December 11, 2012, 02:53:32 am
|
I have tried amolinero's version of the UTFT library with my ITDB32WD display with great results, as you can see in the attachment.  Tomorrow I will also try it with my own code and see if everything also runs OK. How did you wire it up? Did it work proper with 3.3V Logic?
|
|
|
|
|
64
|
Products / Arduino Due / Lin Support on the Due
|
on: December 09, 2012, 04:27:01 pm
|
|
Hi folks,
I get in some serious trouble porting the Lin example from the Atmel Framework. Some parts of the Lin example works on the USART0_Handler and the problem is the Handler is allready defined on the variant.cpp.
I try to integrate it without break up parts in the existing files. I can reuse easily the pdc, lin and usart files frome the example and itegrate them in the Arduino IDE, but the Interrupt makes me cry.
Can some one lend me an helping hand for this.
Best regards
Markus
|
|
|
|
|
67
|
Products / Arduino Due / RTC_library for Due Problems with Alarm and Interrupts
|
on: December 06, 2012, 04:18:59 pm
|
Hi, I stuck in some Problem with the work on the Due RTC lib there is my code and the output my Problem is I get an interrupt at the wrong time and then infinity of them: Sketch #include <rtc_clock.h>
// Select the Slowclock source //RTC_clock rtc_clock(RC); RTC_clock rtc_clock(XTAL);
void setup() { Serial.begin(9600); rtc_clock.init(); rtc_clock.set_time(23, 59, 50); // rtc_clock.settime(14, 57, 50); rtc_clock.set_date(13, 11, 2011); rtc_clock.set_alarmtime(23, 59, 57); rtc_clock.attachalarm(snuzze); }
int x = 0;
void loop() { Serial.print("At the third stroke, it will be "); Serial.print(rtc_clock.get_hours()); Serial.print(":"); Serial.print(rtc_clock.get_minutes()); Serial.print(":"); Serial.println(rtc_clock.get_seconds()); Serial.print(rtc_clock.get_days()); Serial.print("."); Serial.print(rtc_clock.get_months()); Serial.print("."); Serial.println(rtc_clock.get_years()); Serial.println(rtc_clock.get_day_of_week()); // if (x == 100) { // rtc_clock.set_years(2012); // } // x++; }
void snuzze() { Serial.println("#################################"); } The Output At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:51 13.11.2011 7 At the third stroke, it will be 23:59:52 13.11.2011 7 At the third stroke, it will be 23:59:52 13.11.2011 7 At the third stroke, it will be 23:59:52 13.11.2011 7 At t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!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!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ################################# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
At this moment I have no idea about this. Hope someone can help me.
|
|
|
|
|
68
|
Products / Arduino Due / Re: Porting libs from the Atmel Framework
|
on: December 06, 2012, 01:58:53 am
|
Hey Nice to see it I was thinking of pulling the RTC in from the from the framework. Code comment review. There is a potential hiccup. When reading hardware registers and operating on them I always make one good local read/copy of the hardware register and then operate on the same value. So in int RTC_clock::get_hours() { return (((current_time() & 0x00300000) >> 20) * 10 + ((current_time() & 0x000F0000) >> 16)); } converting from BCD to std number the "current_time()" is called twice and each time reads from the hardware registers. With the two current_time() reads they could return different readings. Better I would think to do int RTC_clock::get_hours() { uint32_t dwTimeCurrent = current_time(); return (((dwTimeCurrent & 0x00300000) >> 20) * 10 + (( dwTimeCurrent & 0x000F0000) >> 16)); } Yes you are right, I will correct it, and after it I will make functions to set parts of the date seperate, but its a little bit tricky the day of the week need to be changed too. Hope I'm back soon with the alarmfunction to. Btw. it's my first library, the last time I changed one for the Leonardo, so please be patient (I write it between work and studying) updates will follow soon.
|
|
|
|
|
69
|
Products / Arduino Due / Re: Porting libs from the Atmel Framework
|
on: December 05, 2012, 11:02:48 am
|
Excellent job and nice initiative Markus, porting some ASF libraries for Due from the 1784 ASF samples (almost 50 for Due/X), and that's what we need. Motivated people to motivate others to generate more value inside the Arduino world!
Thanks, and now with the date function
|
|
|
|
|
70
|
Products / Arduino Due / Re: Porting libs from the Atmel Framework
|
on: December 05, 2012, 03:09:11 am
|
|
With the received absolution from Graynomad, I make my first move with an RTC lib for the Due, there are many stuff for the RTC in the Framework and in the Arduino IDE too.
This is my first version inspired by stimmer, really small on functions but you can Set time and Get time. I make some Wrapper Calls around the functions that i found in the IDE to make it a little bit easier to use it, the other functions like Date and Alarm will follow immediately, this is only for the first view.
B.R.
Markus
|
|
|
|
|
71
|
Products / Arduino Due / Porting libs from the Atmel Framework
|
on: December 04, 2012, 06:46:08 am
|
|
Hello guys,
I'm thinking about porting one or another lib from the Framework from the Due/X or the SAM3X-EK would it be reprehensible if I take the libs and put them in an Arduino user friendly muted just with an lib with an nicer frontend for the users and putting the rest what isn't in the lib itself that comes from other parts in it to make it work? So there are easy therms like .init(); and similar.
B.R.
Markus
|
|
|
|
|
73
|
Products / Arduino Due / Re: Native USB port, keyboard, how to toggle VBOF (5V native USB) at PB10 UOTGVBOF
|
on: December 03, 2012, 09:43:52 am
|
May it helps take a look at Page 1108 from the full SAM3xa Manuel
Thank you Markus, this is exactly the right place to look. My problem: I am such a beginner, that I can not write code to toggle UOTGVBOF. It dose not work with digitalWrite(). From page 1108 of the full SAM3xa user manual: • VBUSPO: VBus Polarity Off 0: The UOTGVBOF output signal is in its default mode (active high). 1: The UOTGVBOF output signal is inverted (active low). Greetings, Conrad I'm not sure but try this line in your viod Setup() UOTGHS->UOTGHS_CTRL = UOTGHS_CTRL_VBUSPO; Markus
|
|
|
|
|
75
|
Products / Arduino Due / Re: 5V Clock module with arduino DUE
|
on: December 03, 2012, 04:14:37 am
|
hey guys. hope you can help me out. We tried to switched from UNO to DUE due to performance issues and now we try to get the old clock module (5V exactly this one, http://bildr.org/2011/03/ds1307-arduino/) working on the DUE. I've found the to possible SCL / SDA Ports and tried both. I've also tried 5V and 3.3V. Do I have to power the module with 5V and use resistors? Or can I also use 3.3V with this Module? Thanks for helping me out in this one, kind regards, tobi The DS1307 would not work with 3.3V and the TWI Signals need an Levelshift from 5V to 3.3V. 5V would damage the DUEIf i'm right: SDA and SCL (Pins 20&21) have Pullups --> TWI0 SDA1 and SCL1 (after Pin13) doesn't have Pullups --> TWI1 Btw. if you have an Due with RTC crystal (between the LED line RX,TX,L,ON and the chip, near the chip) you can use the internal clock.
|
|
|
|
|