Show Posts
Pages: 1 [2] 3 4
16  International / Deutsch / Re: Arduino Anfänger benötigt Hilfe bei seinem 4. Projekt on: September 13, 2013, 12:24:02 pm
>int anzahl_led = 5;
oder wie ?
Genau. So viele wie du halt hast.
Du kannst sie mit if (x == y  ) abfragen - oder eleganter mit switch/case.

17  Products / Arduino Due / Re: ATMEL Studio 6.1 + VISUAL MICRO for DUE on: September 13, 2013, 12:14:49 pm
Don't believe this will work as "Arduino code". All ASF Code I have seen and used until now is completely written in "standard" C - no C++, no Arduino wrapper for main. Not at all.

But I found out the prob probably comes from the path. At least when I set the path from 1.5.2 for the Arduino 1.0 it also doesn't run.

18  Products / Arduino Due / ATMEL Studio 6.1 + VISUAL MICRO for DUE on: September 13, 2013, 01:31:24 am
Hi guys,
I have installed both AS6.1 and the VISUAL MICRO plugin for DUE support freshly out of the box. I get support for the Arduino Uno but not for Due. When I set the path in the application manager for Arduino 1.52 nothing happens, the setting is ignored.

This is the path where the file arduino.exe is located:

Anyone an idea?
19  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: August 31, 2013, 11:34:36 am
Hi guys,
here's a quick update of my CAN OBD analyzer:
The software is still under construction, I use a simulator from Ozen Elektronik (a turkish brand) instead of my car. The Display is a Touch-LCD from
Speed, rpm, coolant temp and vehicle frame number are readable (multi-frame transfer took me a while to fiddle with).
I only use the DUE hardware, software is a modified can example for the SAM3X-EK board.

DUE rocks!

20  Products / Arduino Due / Re: Internal RTC with back up battery on: August 25, 2013, 08:23:08 am
>When i make usb connection off and on again, rtc resets to 2007 0..0
Hi, please look at the DUE schematic. There you find that Master-Reset is connected to the 16U2 which produces the reset pulse when reseting or during power-up sequence (DUE: Pin 47, NRSTB  <-- MASTER-RESET--> 16U2: PC7, RESET_CMD) which take place during toggling power.

Bummer, there are really so little soldering jumpers for additional configuration on the board. I also think about how to use VDDBU.
21  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: July 10, 2013, 10:05:41 am
Hi guys,
without reading the 16 pages of this thread before, does anyone has already made a real-world-application for the CAN?

I found CODE BY DEBRAJ DEB FOR OBD READER, made for a Microchip PIC24 CAN device. This code is quite simple to port since all of the data handling is very similar to the data structures used by the Atmel/Arduino example. I fly to Spain for holiday on tomorrow but as a real nerd I of course have my Due with me. Hopefully while with my big toe drilling holes in the sand I have enough time to port the code under the parasol.
22  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: July 04, 2013, 03:20:17 am
No, I haven't. I'm (as a hobbyist) using PIC 18F for several years now and I haven't bricked not even only one. But if the CAN expanders base on the same rationale I do not know. At least for CAN it seems they have the same buffers, protocol engine and control as the 18F458. I actually have two of them on my perf board True, the PICs sometimes are the worst imps of satan in the business. For example the CAN timing on my PICs are 7.7us instead of 8.0us at 125kbaud. I tried several hour to fix but without success. But they do their job with zero in the error counter.
23  Products / Arduino Due / Re: CAN filtering: Error in reasoning? on: July 04, 2013, 01:04:29 am
I'm in great awe of your knowledge and experience. Thank you.
24  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: July 03, 2013, 11:26:26 pm
>Is there such a thing as a CAN I/O expander chips?
Microchip MCP2502 CAN I/O Expander Family

Hope this helps,

25  Products / Arduino Due / Re: CAN filtering: Error in reasoning? on: July 03, 2013, 01:29:12 pm
Collin, you're the man!
The prob hold me, I then thought about it and came to the same conclusion. Now it works perfectly. Thanks, anyway.

But one thing I do not understand. The Filter mask register is read-only. On my CAN PICs I also can write. It seems the message filtering on 8-bit PICs and the 8-bit AVRs work very similar. Maybe they even have (both from an external manufacturer e.g. Intel?) the same CAN protocol engine. But SAM8 is quite different. So this Filter-ID thing confused my for a while.

Something else:
Is there a free white paper (ISO Norm 15031?) available for CAN registers used by the automotive industry? Or wher can I find coded messages, e.g. motor rpm, battery voltage and so on?
26  Products / Arduino Due / Arduino Uno bootloader for DUE clone on: July 02, 2013, 02:03:21 pm
Hi guys,
I try to make a bootloader for a Due Taijino clone but it is hard to accomplish. First I tried the simple way, flashing a ATMega8U2 but the attempt to solder hair-thin wires to the QFN package of the 8U2 failed. Now I fiddle with LUFA to use different Ports on a Arduino Uno for eraseing and resetting the SAM3X8E which is even worse (the original ports of the Arduino Uno have no soldering pad on the pcb). Does anyone knows a "Howto build a due bootloader for dummies" or something ? I really don't want to go into the LUFA makefile-business thing the hard way.
27  Products / Arduino Due / CAN filtering: Error in reasoning? on: July 02, 2013, 01:29:20 am
Please read careful.

Hi guys,
I'm fiddling with the message IDs.

This example I used from the datasheet. It is actually a 29bit example but the situation is the same (really?):

Data goes from CAN 0 to CAN 1.
IDs to filter:
000100 0 11 00  ID0 = 0x08C
000100 0 11 01  ID1 = 0x08D
000100 0 11 10  ID2 = 0x08E
000100 0 11 11  ID3 = 0x08F
000100 1 11 00  ID4 = 0x09C
000100 1 11 01  ID5 = 0x09D
000100 1 11 10  ID6 = 0x09E
000100 1 11 11  ID7 = 0x09F

The cooking recipe from the datasheet:

The CAN_MIDx (Message ID Nr.x) and CAN_MAMx (message acceptance mask
Nr.x) of Mailbox x must be initialized to the corresponding values:
CAN_MIDx = 000 100 x 11 xx = 0x08C
CAN_MAMx = 111 111 0 11 00 = 0x7EC
Ok, got it.

If Mailbox x receives a message with ID6, then CAN_MIDx and CAN_MFIDx
are set:
CAN_MIDx  = 000 100 1 11 10 = 0x09E  //ID6
CAN_MFIDx = 000 000 0 01 10 = 0x006  //Family ID

   /* Init CAN1 Mailbox 0 to Reception Mailbox. */    
    //  CAN_MIDx  = 000100 x 11 xx = 0x08C, message ID example no. 6
    //  CAN_MAMx  = 111111 0 11 00 = 0x7EC, message acceptance mask  
    //  CAN_MFIDx = 000000 0 01 10 = 0x006, family filter ID
    // lets roll
    can1_mailbox.ul_mb_idx = TEST7_CAN_COMM_MB_IDX; //Mailbox select : no.0
    can1_mailbox.uc_obj_type = CAN_MB_RX_MODE;
    can1_mailbox.ul_id_msk =  0x7EC;      // our new mask instead of default (all 1's): CAN_MAM_MIDvA_Msk | CAN_MAM_MIDvB_Msk;
    can1_mailbox.ul_id = CAN_MID_MIDvA(0x08C); //  CAN_MID_MIDvA(TEST7_CAN_TRANSFER_ID);
    can1_mailbox.ul_fid = 0x006;      //Family filter ID
    can_mailbox_init(CAN1, &can1_mailbox);

Now something magic happen:
 After each transmit (I do this with standard message IDs selected by a rotary encoder function)
the family ID changes. So every message - independent of the message ID is received - no filtering at all.
Peeking directly in the register with example ID 0x82 which must definitely denied from the receiver, yields:

Test7 passed
MID = 0x82
CAN1, receive, Mailbox 0, all results in 32bit HEX:
Dat Hi:  MDH   55667788   : should not be received
Dat Lo:  MDL   00000182   : should not be received
FAM ID:  MFID   00000082   :  ???
AccMsk: MAM   000007EC   :  ok

Any idea of what's going on here?

28  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: June 25, 2013, 11:06:52 am
Don't you have a schematic of the board you want to connect to?
Usually to connect to the CAN Transceivers is pretty straightforward. Maybe even they are Pin compatible to others too, so simply watch the footprints and follow the lines. Some are high-speed, some aren't. The best expierince I made was with TI's SN65 series which are avavilable for 5V, too. They can be used for both speed ranges. The High-Speed TJA1050 have a strange behaviour when testing with a multimeter, mine lost the signals after some usec and reacted like a monoflop.
29  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: June 23, 2013, 03:11:41 pm
Here's a photo of my test hardware. DUE + 2x PIC 18F458.

 I'm still researching the deeper sense of some registers since especially the PICs have a behaviour I don't always understand ;-)
30  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: June 17, 2013, 09:03:29 am
Hi Collin, renaming got me in the ballpark (is this yankee phrase suitable here? :-) and after additionally cleaning up the directories it compiles fine. I simply have to little experience with the IDE since all stuff I do with Atmel Studio. Thanks!

Pages: 1 [2] 3 4