Show Posts
Pages: [1] 2 3 ... 6
1  Products / Arduino Due / Re: SPI across two Arduino DUE's on: September 28, 2014, 11:58:50 am
Here is a simple DUE spislave.ino sketch, proof of concept,
   https://github.com/manitou48/DUEZoo/blob/master/spislave.ino
I've tested it with a maple (3.3v) master at various data rates, sending various number of bytes between SS LOW/HIGH.
sketch utilizes SPI library (SPI.begin(SS)) to get pins and such set up, then resets the SPI and enables it in slave mode.
2  Products / Arduino Due / Re: Due for very low power applications? on: July 23, 2014, 05:49:29 am
here are discussions on low power of ARM-based teensy3
    http://forum.pjrc.com/threads/23660-Low-Power-quot-Green-quot-Battery-Operation-Solutions-For-The-Teensy-3
3  Using Arduino / Displays / Re: Mayhew rotary encoder LED ring on: June 21, 2014, 03:59:18 pm
OE needs to attach to ground.
4  Using Arduino / Microcontrollers / Re: The 1284P, a sleeping beauty on a $9 UNO size board? on: May 14, 2014, 07:06:33 pm
I just ordered a sleeping beauty.  What are the specs on the 16 MHz crystal? (part number?  datasheet?)
5  Using Arduino / Installation & Troubleshooting / Re: Sparkfun USB host shield fails with Mega 2560: SOLVED! on: May 02, 2014, 03:47:11 pm
Yep, i had to jumper 10-13 pins, and pin 7 to reset  to get mega2560 to work with sparkfun USB host shield.  Various examples work with USB mouse, but not with my Logitech extreme 3d Pro joysticks -- to get those to work I had to provide 7.5v to DC power jack on 2560 board.  I had two bad joysticks, and I confirmed that some of their analog values were "broken", sigh.  I used  HID example led3p.ino in the USB host library.
6  Products / Arduino Due / Re: Arduino due in low power mode on: February 15, 2014, 08:24:59 am
I've done a few experiments measuring power consumption on DUE.  Running blink sketch (4s period) and power by USB, DUE consumes  115.1ma/116.5ma (board LED off/on).  If I power via Vin, I measure 79.2/80.2 (off/on ma)

Powered via Vin, pmc_enable_backupmode() consumes 18.6ma,  pmc_enable_sleepmode(0) in loop() consumes 60.5 ma, presumably coming out of sleep by timer interrupts.  pmc_enable_waitmode() consumes 78.3ma, so it doesn't seem to be reducing power?

DUE specs suggest ARM chip:  sleep(29ma),wait(23ua),backup(2.5ua)
Of course DUE board has ATMEGA16US, voltage reguators and various LEDs
7  Using Arduino / Installation & Troubleshooting / DUE programming port no longer working on: February 13, 2014, 07:22:03 pm
DUE programming USB port no longer working -- native USB port OK.  Orginally posted on DUE thread
  http://forum.arduino.cc/index.php?topic=216547.0
8  Products / Arduino Due / Re: bad DUE programming port USB on: February 10, 2014, 07:00:33 am
Sorry for not providing enough detail.  No drivers to install.  Host machines are Ubuntu 12.04 and 12.10 and using IDE 1.5.5
it's looking like a hardware problem on DUE connector ...
9  Products / Arduino Due / Re: bad DUE programming port USB on: February 09, 2014, 09:05:46 am
Nope, that incantation did not help.

sometimes it also says  " SAM-BA operation failed"
10  Products / Arduino Due / bad DUE programming port USB on: February 09, 2014, 07:51:44 am
The IDE no longer recognizes the programming port on my DUE (ttyACM0 not found).  If I move the cable to the Native port, everything works.  In the programming port, I do see power LEDs on, but it won't upload and a sketch won't print to the monitor.  I assume one or more of the pins in the connector must have lost connection??   Any magic that might be applied?

I have tried another cable and tried hooking to a different computer ... no luck.

(at least, it works with the Native port)
11  Products / Arduino Due / CC3000 wifi on DUE on: January 18, 2014, 01:27:48 pm
Here are some initial test results of TI's CC3000 wifi chip on the Adafruit breakout board:
    https://www.adafruit.com/products/1469
The Adafruit CC3000 library (github) was recently updated to include support of DUE.  Results for some UDP and TCP tests on DUE (12 mhz SPI) and on Teensy 3.0 and 3.1 (8 mhz SPI) and mega2560 (8 mhz SPI) can be found at
     https://github.com/manitou48/DUEZoo/blob/master/cc3000.txt

(To support big buffers, required patch to SPI.transfer loop in ccspi.cpp to use uint16_t loc )
12  Products / Arduino Due / Re: Arduino due / ppm on: December 06, 2013, 04:45:54 pm
Hmmm, I guess you wanted to go from servos to PPM.  Here is another untested DUE snippet that reads 6 servo channel pins and outputs a PPM stream.  You need to order the servo channels so the PPM output is what the PPM receiver expects.  The loop() is busy doing the PPM output.  If you have other work to do, you can use stimmer's code above to generate the PPM stream in the background.

Code:
// generate a ppm stream from 6 channels of "servo" input, e.g. RC receiver
//  you'll need to know servo order that ppm receiver is expecting
// PPM output on pin 3, servos in order pins 4-9

#define MAX_SERVOS 6
uint32_t servos[MAX_SERVOS];   // pulse width in microseconds

#define PW 400
#define W 24000

#define PPM_PIN 3

void handler1() {
static uint32_t prev=0;
uint32_t width,t;
t = micros();
if (digitalRead(4) == LOW) servos[0] = t - prev;  // fallen
prev = t;
}

void handler2() {
static uint32_t prev=0;
uint32_t width,t;
t = micros();
if (digitalRead(5) == LOW) servos[1] = t - prev;  // fallen
prev = t;
}

void handler3() {
static uint32_t prev=0;
uint32_t width,t;
t = micros();
if (digitalRead(6) == LOW) servos[2] = t - prev;  // fallen
prev = t;
}

void handler4() {
static uint32_t prev=0;
uint32_t width,t;
t = micros();
if (digitalRead(7) == LOW) servos[3] = t - prev;  // fallen
prev = t;
}

void handler5() {
static uint32_t prev=0;
uint32_t width,t;
t = micros();
if (digitalRead(8) == LOW) servos[4] = t - prev;  // fallen
prev = t;
}

void handler6() {
static uint32_t prev=0;
uint32_t width,t;
t = micros();
if (digitalRead(9) == LOW) servos[5] = t - prev;  // fallen
prev = t;
}

void setup() {
int i;

for(i=0;i<MAX_SERVOS;i++) servos[i] = 1500;  //  idle
pinMode(PPM_PIN,OUTPUT);
attachInterrupt(4,handler1,CHANGE);
attachInterrupt(5,handler2,CHANGE);
attachInterrupt(6,handler3,CHANGE);
attachInterrupt(7,handler4,CHANGE);
attachInterrupt(8,handler5,CHANGE);
attachInterrupt(9,handler6,CHANGE);
}

void loop() {
int i,t;

t=0;
for (i=0; i< MAX_SERVOS; i++){ // PPM out
digitalWrite(PPM_PIN,HIGH);
delayMicroseconds(PW);
digitalWrite(PPM_PIN,LOW);
delayMicroseconds(servos[i]-PW);
t += servos[i];
}
digitalWrite(PPM_PIN,HIGH);   // idle fill
delayMicroseconds(PW);
digitalWrite(PPM_PIN,LOW);
delayMicroseconds(W-t);
}
13  Products / Arduino Due / Re: Arduino due / ppm on: December 06, 2013, 01:12:22 pm
Here is an untested (but compiled) DUE snippet that reads PPM on pin 7 and drives 6 servos (pins 8-13).

Code:
// take RC tranmsitter PPM on pin 7, drive servos on pins 8-13
#include <Servo.h>

#define PPM_PIN 7
#define PPM_IDLE 3000
#define MAX_CHANNELS 6
uint32_t channels[MAX_CHANNELS];

Servo servos[MAX_CHANNELS];

// PPM interrupt
void handler() {
static uint32_t prev=0,chno=0;
uint32_t width,t;

t = micros();
width = t - prev;
if (width > PPM_IDLE) {
chno = 0;   // next pulse is channel 0
} else if (chno < MAX_CHANNELS) {
servos[chno].writeMicroseconds(width);
channels[chno++] = width;    // for printing
}
prev = t;
}

void setup() {
int i, pin=8;
Serial.begin(9600);
for (i=0; i<MAX_CHANNELS; i++) {
servos[i].attach(pin++);
}
    attachInterrupt(PPM_PIN,handler,RISING);
}

void loop() {
int i;

delay(3000);
for (i=0; i<MAX_CHANNELS; i++) Serial.println(channels[i]); //debug
}
14  Products / Arduino Due / Re: Due Integrated RTC time drift on: December 05, 2013, 06:02:31 am
here are some data on drift of MCU crystals and RTC's including DUE
 https://github.com/manitou48/crystals

crystals.txt has the drift data.  drift is affected by voltage, temperature, age, and capacitance.
 your mileage may vary.

Here are specs for MCU crystal and RTC from the DUE 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
15  Products / Arduino Due / Re: Arduino due / ppm on: December 04, 2013, 09:31:37 am
there is a blog dedicated to RC and Arduino, visit
  http://rcarduino.blogspot.com/
they have examples of using timer interrupt to capture PPM and then using Servo lib (or decade counter) to pulse servos.  Not sure how many DUE examples though ...
Pages: [1] 2 3 ... 6