Show Posts
Pages: 1 2 3 [4] 5 6 ... 32
46  Products / Arduino Due / Re: Arduino Due and 1602 LCD keypad shield modification on: February 21, 2014, 02:32:11 pm
Do you think I can take the Sain smart board and pull the TC1602 and replaced it with a HD44780 from sparkfun electronics?

I don't see how you can do that. AFAIK, most of the 1602s are glued (epoxied) directly onto the board and for sure both prints (TC1602 and HD44780) will not match. I'd rather recommend you to get a new 3.3v LCD board.
Palliser
 
47  Products / Arduino Due / Re: Arduino Due Dac configuration on: February 21, 2014, 12:59:38 pm
As a reference, here a BareMinimum sketch that generates a decent 1.4kHz sinewave (120 samples) using DUE's DAC1.

Code:
int i = 0;
void setup() {
  analogWriteResolution(12);
}

static int sine[] = {
    0x7ff, 0x86a, 0x8d5, 0x93f, 0x9a9, 0xa11, 0xa78, 0xadd, 0xb40, 0xba1,
    0xbff, 0xc5a, 0xcb2, 0xd08, 0xd59, 0xda7, 0xdf1, 0xe36, 0xe77, 0xeb4,
    0xeec, 0xf1f, 0xf4d, 0xf77, 0xf9a, 0xfb9, 0xfd2, 0xfe5, 0xff3, 0xffc,
    0xfff, 0xffc, 0xff3, 0xfe5, 0xfd2, 0xfb9, 0xf9a, 0xf77, 0xf4d, 0xf1f,
    0xeec, 0xeb4, 0xe77, 0xe36, 0xdf1, 0xda7, 0xd59, 0xd08, 0xcb2, 0xc5a,
    0xbff, 0xba1, 0xb40, 0xadd, 0xa78, 0xa11, 0x9a9, 0x93f, 0x8d5, 0x86a,
    0x7ff, 0x794, 0x729, 0x6bf, 0x655, 0x5ed, 0x586, 0x521, 0x4be, 0x45d,
    0x3ff, 0x3a4, 0x34c, 0x2f6, 0x2a5, 0x257, 0x20d, 0x1c8, 0x187, 0x14a,
    0x112, 0xdf, 0xb1, 0x87, 0x64, 0x45, 0x2c, 0x19, 0xb, 0x2,
    0x0, 0x2, 0xb, 0x19, 0x2c, 0x45, 0x64, 0x87, 0xb1, 0xdf,
    0x112, 0x14a, 0x187, 0x1c8, 0x20d, 0x257, 0x2a5, 0x2f6, 0x34c, 0x3a4,
    0x3ff, 0x45d, 0x4be, 0x521, 0x586, 0x5ed, 0x655, 0x6bf, 0x729, 0x794
};

void loop() {
  analogWrite(DAC1, sine[i]);
  i++;
  if(i == 120)
    i = 0;
}

Regards, palliser
48  Products / Arduino Due / Re: Arduino Due and 1602 LCD keypad shield modification on: February 20, 2014, 05:32:58 pm
Hello weightwatcherphil,

I think your problem lies in your LCDKeypad shield itself. Why? The minimum VDD for logic in the TC1602 is 4.8V, thus with 3.3V it will not work. May be your solutions are either to replace your shield for a 3.3V or to use a logic level converter like:
https://www.sparkfun.com/products/11978 or so.

Regards,
Palliser
49  Products / Arduino Due / Re: Arduino Due on: February 20, 2014, 05:02:39 pm
Is this indicating I hook the speakers up to DAC0 and 1 or do I need to hook them to DAC0,1, and GND, or what?

Hello xaviorbat,
Before you frytry any of your Due's DAC outputs, please, read first the following post.

http://forum.arduino.cc/index.php?topic=139733.15

Regards, Palliser.

50  Products / Arduino Due / Re: TX and RX not working with the SoftwareSerial library with Arduino Due (serLCD) on: February 20, 2014, 04:50:15 pm
maksudcan,

I assume from your description that you have a Sparkfun model LCD-09066, then, let's start trying to make your LCD to work, for example, with Serial1 on DUE. For that you just need to connect your LCD as the following picture:



Quote
Note from Sparkfun:
"Though the silkscreen may say '5V', this is a 3.3v Serial LCD. Connect to a 3.3v power source".

Tweaking a bit the sample1 from Sparkfun, try the following sketch:

Code:
void setup()
{
  Serial1.begin(9600); // set up serial port for 9600 baud
  delay(500); // wait for display to boot up
}

void loop()
{
  Serial1.write(254); // move cursor to beginning of first line
  Serial1.write(128);

  Serial1.write("                "); // clear display
  Serial1.write("                ");

  Serial1.write(254); // move cursor to beginning of first line
  Serial1.write(128);
 
  Serial1.write("Hello, world!");

  while(1); // wait forever
}

Good luck!
51  Products / Arduino Due / Re: TX and RX not working with the SoftwareSerial library with Arduino Due (serLCD) on: February 20, 2014, 03:26:34 pm
I googled for "Sparkfun serial enabled LCD screen" and the Sparkfun website shows a dozen of LCDs. Most of them require 5V TTL serial (DUE works with 3.3V). Which one you are using? LCD-??????

Also, SoftwareSerial is a good 'crutch' AVR serial library (not intended for DUE) and Mark is right. DUE doesn't need SoftwareSerial given its 4 serial ports (like Mega).

Regards, Palliser.
52  Products / Arduino Due / Re: Error while trying to use scheduler.startLoop in scheduler library ardiuno DUE on: February 20, 2014, 02:43:50 pm
Hello alibaba9292,

Wprogram.h? I am not sure but it seems to me that you are using the Arduino Schedule library for AVR.
http://playground.arduino.cc/Code/Scheduler

This library is not intended for Arduino DUE (SAM based).

The IDE 1.5.x has its own scheduler library. Why not try the MultipleBlinks example as a start point?.
File->Examples->Scheduler

Regards, Palliser
53  Products / Arduino Due / Re: No SPI in 1.5.5 ? on: February 20, 2014, 02:17:18 pm
Hi VolDel,
Arduino DUE has a buit-in Ethernet controller (EMAC). I've started a post of a library development but using a third-party DUE board given the degree of access to the Ethernet pins in the original DUE. So far, I have a raw library (ported from Atmel) with a simple web-server sketch that runs OK. I hope to resume the post soon and move on with an oriented Arduino Ethernet library and a couple of sample sketches. If you are interested, here the link (look a my reply #92).

http://forum.arduino.cc/index.php?topic=142908.90

Regards, Palliser
54  Products / Arduino Due / Re: No SPI in 1.5.5 ? on: February 20, 2014, 11:36:21 am
Hello VolDel,

Each Arduino IDE 1.5.x has SPI library with a couple of examples.

Quote
File->example->SPI->BarometricPressureSensor
                                 DigitalPotControl

Files location:
Quote
...\arduino-1.5.5-r2-windows\arduino-1.5.5-r2\hardware\arduino\sam\libraries\SPI

Indeed, Due SPI library has an Extended functionality that exploits the SAM3X8E core allowing features like:
- Automatic handling of the device slave selection.
- Automatic handling of different device configurations.

More information here:
http://arduino.cc/en/Reference/DueExtendedSPI#.UwYvuvldWSo

Look at Graynomad Due pinout diagram for details on the SPI connection.
http://forum.arduino.cc/index.php?topic=132130.0

You can play with or modify them according to your needs.
By the way, what SPI device you need to connect to DUE? LCD? SD reader?

Regards, Palliser
55  Products / Arduino Due / Re: analogWrite freezes the board on: February 19, 2014, 05:52:04 pm
Hello jdorval,
Which IDE version you are using? 1.5.5-r2 or older?
Also, could you run the following code to see if the built-in led L (amber) fades?

Code:
const int ledPin = 13;

void setup() {
  pinMode(ledPin, OUTPUT); }

void loop() {
  for (int brightness = 0; brightness < 255; brightness++) {
    analogWrite(ledPin, brightness);
    delay(2);
  }
  for (int brightness = 255; brightness >= 0; brightness--) {
    analogWrite(ledPin, brightness);
    delay(2);
  }
  delay(100);
}

Regards,
Palliser
56  Products / Arduino Due / Re: Which library to use for SDA1 and SCL1 (second I2C) Arduino Due on: February 18, 2014, 09:52:46 am
I just tested the master reader/slave sender example with two DUEs for second I2C (SDA1/SCL1) using 1K pull-up resistors and the communication is OK. Please, verify that. Regards, Palliser.

NOTE: Remember to use wire1.xxx() instead of wire.xxx() for the functions.
-P
57  Products / Arduino Due / Re: Due 5V once again on: February 13, 2014, 09:51:39 am
From Table 46-1, page 1389 of the Atmel doc11057.pdf:
http://www.atmel.com/Images/doc11057.pdf

Quote
Absolute Maximum Ratings*

Voltage on Input Pins with Respect to Ground................... -0.3V to + 4.0V
Maximum Operating Voltage (VDDCORE)............................. 2.0V
Maximum Operating Voltage (VDDIO)................................... 4.0V
Total DC Output Current on all I/O lines................................ 130 mA

*NOTICE:
Stresses beyond those listed under "Absolute Maximum
Ratings" may cause permanent damage to the device.
This is a stress rating only and functional operation of the
device at these or other conditions beyond those indicated
in the operational sections of this specification is
not implied. Exposure to absolute maximum rating
conditions for extended periods may affect device
reliability.

Regards,
Palliser
58  Products / Arduino Due / Re: Which library to use for SDA1 and SCL1 (second I2C) Arduino Due on: February 11, 2014, 11:06:03 pm
My prior recommendation (reply#3) does not work. I just tested it using two DUEs with the master_writer and slave_receiver sketches.

I made a couple extra tests that work OK.

Test A: Master SDA1/SCL1 writes on Slave SDA/SCL.
(Using Wire1.xxx() in the master code. Using Wire.xxx() in the slave code).

Test B: Master SDA/SCL writes on Slave SDA1/SCL1
(using Wire.xxx() in the master code. Using Wire1.xxx() in the slave code).

So far so good, but maksudcan's problem remains. I can't establish communication between Master and Slave both in SDA1/SCL1.

There is only one Wire library (.h,.cpp) and one class (TwoWire).
The pin definition for Wire1 is defined in Wire (.h,.cpp) and variant (.h,.cpp).
I will try to make more time soon and do more tests.

Regards,
Palliser
59  Products / Arduino Due / Re: Which library to use for SDA1 and SCL1 (second I2C) Arduino Due on: February 11, 2014, 05:05:46 pm
Hello maksudkan,

Try this with a workable SDA/SCL (first I2C) project.

Quote
#include <Wire.h>
extern TwoWire Wire1;

and then, replace all the Wire.xxxx() with Wire1.xxxx()

Here how it looks using example master_reader from
Quote
...\Arduino-1.5.x\hardware\arduino\sam\libraries\Wire\examples\master_reader

Code:
#include <Wire.h>
extern TwoWire Wire1;
void setup()
{
  Wire1.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);  // start serial for output
}

void loop()
{
  Wire1.requestFrom(2, 6);    // request 6 bytes from slave device #2

  while(Wire1.available())    // slave may send less than requested
  {
    char c = Wire1.read(); // receive a byte as character
    Serial.print(c);         // print the character
  }

  delay(500);
}

Remember to use pins 70 (SDA1), 71 (SCL1)
Regards,
Palliser
60  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: February 11, 2014, 03:05:30 pm
Hello Mark and thanks for your contribution with the gateway.  Looks promising as a base for future applications.
Are you using the CAN analyzer from Microchip or  ADFweb? It would be great also if you show us pictures of your DUE and transceiver with the analyzer.

Regards!
Palliser
Pages: 1 2 3 [4] 5 6 ... 32