Show Posts
Pages: 1 ... 3 4 [5]
61  Products / Arduino Due / Re: Error in pinout table on: October 28, 2012, 09:26:28 am
More pin mapping details can be seen in

62  Products / Arduino Due / Re: pgmspace.h is not supported? on: October 27, 2012, 06:57:09 pm
maple has  __FLASH__, e.g.,
uint32_t array[] __FLASH__ = {0, 1, 2};
  but that doesn't seem to work for DUE gcc. smiley-sad

But another thread in this Due forum notes that declaring things "const" puts them in flash ...  smiley
63  Products / Arduino Due / Re: random number generator (TRNG) API ? on: October 26, 2012, 10:46:25 am
mantoui, thanks i tried and it works... after a little tweak:


Why the hole 32bit if I didn't read the spec wrong the first bit would be enough!?

defines let you do something like
     TRNG->TRNG_IDR = TRNG_IDR_DATRDY; // disable interrupts
64  Products / Arduino Due / Re: random number generator (TRNG) API ? on: October 26, 2012, 06:12:12 am
is already available from CMSIS as TRNG. In general i see that registers structures are named using camel case (struct Trng) while actual instances of such structures are capital case (TRNG for example but some has numbering if there are many like TWI0 / TWI1).


Is there documentation for CMSIS ??

65  Products / Arduino Due / Re: Error in pinout table on: October 26, 2012, 05:41:42 am
another column for the pin-map table might be the Timer Counter associations (Table 37-4)
66  Products / Arduino Due / random number generator (TRNG) API ? on: October 25, 2012, 07:12:57 pm
Processor has TRNG (datasheet chapter 43), but I don't see any API yet, and I presume it's not incorporated in random/rand.
Has anyone with a board tried it?  There is a Trng struct defined in arduino-1.5/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/include/component/component_trng.h, though I couldn't figure out how to reference it in sketch, so I copied and hacked it to get the following little sketch to compile, but I don't have a board yet to know if this works ...

// DUE's TRNG  32 bits every 84 ticks
//#include <component/component_trng.h>
#include "component_trng.h"
Trng *trng;

void setup() {
    trng = (Trng *) 0x400BC000;
    trng->TRNG_CR = TRNG_CR_KEY(0x524e47) | TRNG_CR_ENABLE;

void loop() {
    unsigned int rng;
    while (! (trng->TRNG_ISR & TRNG_ISR_DATRDY));  //wait til data ready
    rng = trng->TRNG_ODATA;
67  Products / Arduino Due / Re: DUE temperature sensor API on: October 25, 2012, 07:05:16 pm
datasheet at
68  Products / Arduino Due / Re: Error in pinout table on: October 25, 2012, 05:49:16 pm
Another pin out typo?   PA18 should be SCL1

Any chance of adding sink/source current limits to the table for each pin?  I know it's in Table 46-2 in ref manual , but ...
69  Products / Arduino Due / Re: DUE temperature sensor API on: October 25, 2012, 03:15:10 pm

So analogRead(15) will only work if the TSON bit in ADC_ACR is set by the looks of it. So it's up to the Arduino guys to do that or I guess you can do it yourself.

in hardware/arduino/sam/system/libsam/source/adc.c there is an  adc_enable_ts() that sets   ADC_ACR_TSON, and the temperature calculation is described in Chapter 46.8 of reference pdf,  2.65mv/deg and 0.8v at 27C
70  Products / Arduino Due / Re: DUE temperature sensor API on: October 25, 2012, 11:14:09 am
Yes, I don't have a board yet either (wrong side of the pond) -- looking at the underlying source, me thinks an analogRead(15) might work ...
71  Products / Arduino Due / DUE temperature sensor API on: October 25, 2012, 10:43:24 am
Reference manual says processor has temperature sensor on ADC channel 15, what is the API for reading temperature?
72  Products / Arduino Due / ADC internal voltage reference for DUE ? on: October 23, 2012, 07:03:55 am
The UNO has 1.1v internal voltage reference for ADC, and the ARM-based Maple has a 1.2v interval voltage for ADC (ADC1, channel 17).  Reading the SAM3X8E reference manual, I don't think the DUE has an internal voltage reference for ADC. Is this true?

The DUE's ADC does have a gain that can be configured to trade precision for range.
73  Using Arduino / Audio / I2C FM with Parallax 27984 on: June 18, 2012, 08:26:05 pm
Here is a simple sketch using I2C and serial terminal to exercise the Parallax FM module (part 27984)

No external pullups need.

The Parallax documentation is incomplete. I had to examine the spin/stamp codes to figure out how to do seeks.  Parallax info:

With a few minor changes, sketch works on Maple.
74  Using Arduino / Storage / arduino/maple SPI/SD performance on: May 21, 2012, 04:40:10 pm
ran some simple 1000-byte unconnected SPI performance tests on both Arduino and Maple (plus DMA), and then tested Arduino SD/RTC shield block read/write performance.  SD read/write uses readBlock()/writeBlock() (512 byte blocks). summary below.  your mileage may vary  smiley

unconnected SPI performance (transfer 1000 bytes)

             maple spi       maple spi/dma
SPI clock   read/write         read/write
1.125MHz     .85mbs               1.125mbs
2.25MHz     1.35mbs               2.25mbs
4.5MHz      1.8mbs                4.5mbs
9MHz        2.2mbs                8.9mbs
18MHz       2.2mbs               17.8mbs

  SD/SPI block (512 bytes) read/write Arduino SD/RTC shield

             maple spi        maple spi/dma
SPI clock   read    write     read      write
1.125MHz    0.75mbs 0.64mbs    1mbs     0.84mbs
2.25MHz     1.1mbs  0.91mbs    1.86mbs  1.36mbs
4.5MHz      1.4mbs  1.2mbs     3.19mbs  2.0mbs
9MHz        1.6mbs  1.25mbs    5.1mbs   2.6mbs
18MHz       1.6mbs  1.3mbs     7.1mbs   3.06mbs

                    arduino  avr328/16MHz
               SPI         SD (with OPTIMIZE_HARDWARE_SPI)
SPI clock   read/write     read    write
2MHz          1.57mbs      1.4mbs  1.2mbs
4MHz          2.6 mbs      2.3mbs  1.7mbs
8MHz          3.8mbs       3.4mbs  2.1mbs

75  Using Arduino / Networking, Protocols, and Devices / Re: W5200 Module on: May 07, 2012, 01:55:55 pm
Another testimonial for WIZ820io.  I used patches from wiznet site for both 022 IDE and v1.0 IDE.  Hooked it up to 3.3v/grnd from Uno and SPI pins (10-13) , and wiz820 reset to reset on UNO.  as noted, io pins are 5v-tolerant.  Simple UDP and TCP tests worked just fine. 8-byte UDP request-reply  took about 564us (022 IDE), 892us (v1 IDE).  Sending out 1000-byte UDP packets at about 3.5ms/packet.  Inbound UDP 1000-byte packets with no drops at 2Mbs, which is probably consistent with SPI running at 4 MHz.

 Also tested on Maple ARM
Pages: 1 ... 3 4 [5]