Show Posts
Pages: 1 [2] 3 4 5
16  Products / Arduino Due / Re: I2C + DMA on: March 09, 2013, 01:44:35 pm
Are you really using DMA?  I don't see any reference to PDC. Is your test just allowing the I2C lib to run in the background, with its interrupt handler transmitting each byte??

 I just hacked a version of i2c for the Maple to use DMA -- no significant speed advantages, but presumably the CPU could do something else while the I2C transfer is ongoing.  DMA for the I2C write was straightforward, but on the maple , DMA for the I2C read was a bit more tricky (at least for me), having DMA receive the first n-2 bytes, and then letting the I2C driver manage the last two bytes so it could handle NACK and start/stop.  I only tested with an I2C EEPROM.
17  Products / Arduino Due / Re: Crystals on the Due on: March 06, 2013, 06:12:25 pm
From the schematic/bom
   Y1,12MHz KX-7 20pF     CRYSTAL-3.2-2.5           CRYSTAL-3.2-2.5  probably 30ppm
   Y2,32.768Khz,RESONATOR_EPSON_FC_145,RESONATOR_EPSON_FC_145   20ppm 12.5pf

I did some frequency checks using NTP-host and/or GPS pps, see

  https://github.com/manitou48/crystals
18  Products / Arduino Due / Re: I2C + DMA on: March 06, 2013, 05:13:51 pm
I'll be interested in your progress.  All I can offer  are SPI+DMA sketches based on SdFat stuff and a memory-to-memory DMA sketch, see

https://github.com/manitou48/DUEZoo

(I am actually messing with DMA+I2C on maple ... not much progress)
19  Products / Arduino Due / Re: RTT and 32KHz crystal frequency check on: March 05, 2013, 06:59:23 pm
I'm still searching for  part number or data sheet or specs (ppm) for the DUE 12MHz crystal .....  The eagle files bill of material just says crystal oscillator.

On further review, the DUE schematic says Y1,12MHz KX-7 20pF -- google says that might have 30ppm accuracy. 

I'll go with that unless someone knows better.
20  Using Arduino / Microcontrollers / amazon nano clone (china) fails on: January 14, 2013, 08:38:37 pm
Buyer beware.  I have a working nano from gravitech, but ordered an "Arduinno nano 3.0" from amazon.  After a few weeks, it arrived from shenzheng, china.  It ran a few sketches, but after an hour it no longer worked.  Multimeter showed only 0.015v on Vin? (running from USB), and initially 5v (pin 27) showed 4.8v, but now it shows only 2.6v and the USB is no longer recognized by PC.   sigh.  you get what you pay for. 

Others I see have complained about Amazon selling units as Arduino, when they are in fact clones.
21  Products / Arduino Due / Re: LED Brightness on: January 14, 2013, 03:52:05 pm
The HC pins can source/sink  15/9 ma.  The LC pins only provide 6/3 ma.  See the "pin out diagram", the first thread in the DUE forum, for which pins are HC.  If you want to drive your LED at 20ma, you'll need a transistor or IC
22  Products / Arduino Due / Re: Due and ethernet processing speed on: January 11, 2013, 04:49:57 pm
Just for the record, I ran some W5200 tests on the DUE with SPI and SPI+DMA, maple and DUE results are in wizperf.txt at
      https://github.com/manitou48/DUEZoo
23  Products / Arduino Due / Re: OneWire in Due on: January 11, 2013, 04:38:04 pm
Does Due have a tone() function yet?  If so, please output an infinite duration 15 kHz tone on a pin during the test.


I believe the tone functions are still not ported.

I'm not sure what this has to do with onewire thread, but I have a proof-of-concept tone(), see tone1.ino in
    https://github.com/manitou48/DUEZoo

 
24  Products / Arduino Due / Re: OneWire in Due on: January 11, 2013, 08:02:34 am
Though read_bit() seemed to be working, I modified it as well to match the maple version.  The two sketches seemed to work with the slimmer version.  NO delay(1)'s required.

Code:
uint8_t OneWire::read_bit(void)
{
IO_REG_TYPE mask=bitmask;
volatile IO_REG_TYPE *reg IO_REG_ASM = baseReg;
uint8_t r;

DIRECT_MODE_OUTPUT(reg, mask);
DIRECT_WRITE_LOW(reg, mask);
delayMicroseconds(5);
DIRECT_MODE_INPUT(reg, mask); // let pin float, pull up will raise
delayMicroseconds(5);
r = DIRECT_READ(reg, mask);
delayMicroseconds(60);
return r;
}
25  Products / Arduino Due / Re: OneWire in Due on: January 10, 2013, 08:20:10 pm
I rewrote  write_bit() in OneWire.cpp to match (more or less) what was working on the maple.  This seems to work for me without any delay(1);!  Works on both the little ds18b20 sketch and the Examples>OneWire>DS18x20_temperature.

Code:
void OneWire::write_bit(uint8_t v)
{
IO_REG_TYPE mask=bitmask;
volatile IO_REG_TYPE *reg IO_REG_ASM = baseReg;

if (v & 1) {
// noInterrupts();
DIRECT_MODE_OUTPUT(reg, mask); // drive output low
DIRECT_WRITE_LOW(reg, mask);
delayMicroseconds(5);
// DIRECT_WRITE_HIGH(reg, mask); // drive output high
DIRECT_MODE_INPUT(reg, mask); // let pin float, pull up will raise
delayMicroseconds(60);
//interrupts();
} else {
//noInterrupts();
DIRECT_MODE_OUTPUT(reg, mask); // drive output low
DIRECT_WRITE_LOW(reg, mask);
delayMicroseconds(60);
DIRECT_MODE_INPUT(reg, mask); // let pin float, pull up will raise
//DIRECT_WRITE_HIGH(reg, mask); // drive output high
//interrupts();
}
delayMicroseconds(10); // 10uSec recovery time
}
26  Products / Arduino Due / Re: DUE PWM Frequency on: January 10, 2013, 04:10:30 pm
Has anyone found a solid way (preferably in sketch) to modify the output PWM frequency?  Also changing variant.h from 1k to what ever you want isnt working for me.  Changing it and saving doesn't change the output frequency.

Daniel

You have to restart the IDE if you make changes to the underlying libraries as they are compiled only once for the sketch "to save time".  

you might look at PWMC_ConfigureClocks()
27  Products / Arduino Due / Re: OneWire in Due on: January 10, 2013, 01:29:21 pm
my select() in OneWire.cpp follows.  I'll let you be master of your library source.  thanks

Code:
void OneWire::select( uint8_t rom[8])
{
    int i;

    write(0x55);           // Choose ROM
    delay(1); // thd

    for( i = 0; i < 8; i++) {
        write(rom[i]);
        delay(1);  // thd
    }
}


28  Products / Arduino Due / Re: OneWire in Due on: January 10, 2013, 01:12:36 pm
your sketch, seemed to work consistently with or without delay(1);

the Examples was bad every other query without the delay(1) using ds.skip()

I got Examples to work by adding delay(1) between every write in the select() function in OneWire.cpp,
and no delay(1) in the Examples sketch

I had also tried delayMicroseconds in select() with no luck, so I switched to delay(1); but presumably something
shorter than a millisecond might work ... sort of hit and miss.
29  Products / Arduino Due / Re: OneWire in Due on: January 10, 2013, 12:43:27 pm
I tested your lib and sketch on linux with IDE 1.5.1 (didn't compile with 1.5).  I edited OneWire.h as suggested.  Sketch worked.  Also tested with no   delay(1);  -- still worked.

I tested the Examples>OneWire>DS18x20_Temperature.  It would work if I replaced ds.select(addr); with ds.skip();  With delay(1);'s it worked each query.  With no delay(1); every other query would return Data with FFs

Code:
    ROM = 28 86 42 5B 3 0 0 84
        Chip = DS18B20
        Data = 1 82 1 4B 46 7F FF E 10 70  CRC=70
        Temperature = 24.12 Celsius, 75.43 Fahrenheit
        No more addresses.


In a later experiment, I got the Example to work by adding delay(1);'s in the ds.select() function  in OneWire.cpp
30  Products / Arduino Due / Re: unconnected SPI performance -- library vs DMA on: January 01, 2013, 05:13:15 pm
I added performance results for the DUE's "extended" SPI mode.  For the unconnected tests, the extended mode is faster than the older SPI  API.  See  SPIperf.txt on the git site below

   https://github.com/manitou48/DUEZoo
Pages: 1 [2] 3 4 5