Show Posts
Pages: [1] 2
1  Development / Other Software Development / Re: Arduino on Xcode Project — Official Thread on: February 29, 2012, 01:35:42 pm
Hey,

Thanks for the fast reply. No prob, I'll be happy to go back to 0023 if I can use XCode as the IDE smiley-wink

My board of choice is the Teensy right now, maybe I can figure out how to make it one of the board options...

Cheers,

Dave
2  Development / Other Software Development / Re: Arduino on Xcode Project — Official Thread on: February 29, 2012, 01:12:53 pm
Oh, yeah, I'm using the Arduino 1.0. Is the project template compatible with this?

Dave
3  Development / Other Software Development / Re: Arduino on Xcode Project — Official Thread on: February 29, 2012, 01:07:48 pm
ave33 et. al.

Awesome work! Just stumbled upon this. Tried to get a project working as per the pdf instructions, there appear to be a couple of snags. I don't have a "Libraries" folder in my ~/Documents/Arduino folder. Also, some funny business with the Build and Make targets- at first glance, it looks like the location that is expected for the arduino_pins.h is incorrect, and the script ends up making empty .h and .c files for it? Build and Make fail because of this.

I have to run, but will give this a good look later and report back. The thought of being able to use XCode for this is too cool.

Note- The Serial target works just fine, puts up a Terminal window that does communicate with the Arduino.

Dave
4  Using Arduino / Sensors / Re: Recommendation needed, 12-16 channels 12-bit SPI interface ADC on: December 12, 2011, 07:15:16 pm
It's only 8 channels, but 16 bit (14 at high speeds) Max1168...QSOP package, but you can get a dip converter. I've just started hooking one up and started talking to it last night.
5  Using Arduino / Installation & Troubleshooting / Re: Driver install without Administrator privileges for Uno on: February 16, 2011, 07:11:26 pm
Macs don't need a driver with the Uno. Excellent improvement for the Uno, IMHO.
6  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: AVR Bootloader burn error in Arduino 9 and 10 on: October 18, 2007, 03:08:14 pm
Hi Mellis,
Yeah, I tried burning the bootloader as the 168 on an NG board, but so far NG smiley-wink It looks like my mkII is still working, the lights still do their thing and I don't get any error messages, but who knows?

I have 4 diecimila boards on order, they should should be here next week, so even if this doesn't work I won't be out of commision too long.

One other thing I've noticed in my 10 months or so away from this stuff- the sketches I had from version 7, when re-compiled with 8, 9 or 10 are much smaller and didn't work on the NG boards I had with Atmega8 chips. Any ideas?

Thanks!

Dave
7  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: AVR Bootloader burn error in Arduino 9 and 10 on: October 18, 2007, 01:56:12 pm
Also, it took about 10 minutes to burn the boot loader. Maybe put in the avr messages as it's doing this, 10 minutes is a long time for an app to be unresponsive. I remember it taking this long from the command line when I did it last year, but it worked. It also seems to take about as long from the command line now.
8  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: AVR Bootloader burn error in Arduino 9 and 10 on: October 18, 2007, 01:41:24 pm
what things die easily? The mkII or the 168 chips? smiley-wink
9  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: AVR Bootloader burn error in Arduino 9 and 10 on: October 18, 2007, 01:40:25 pm
Things are better- I didn't realize the board had to be powered as well as the mkII, so it burned the boot loader. However, I'm using a 168 with an old NG board, and it doesn't work after burning the new bootloader. I'm going to see if I can find an old bootloader to try on it...


Dave
10  Forum 2005-2010 (read only) / Bugs & Suggestions / AVR Bootloader burn error in Arduino 9 and 10 on: October 18, 2007, 12:13:20 pm
Hi,I have an AVR ISPMKII USB dongle and when I try to burn my bootloader to my NG board with a 168 chip on it, I always get the following error:

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


Any ideas? It clearly sees my dongle,just can't do anything with it. Lights do blink...

Any and all info, much appreciated.

Dave

11  Forum 2005-2010 (read only) / Troubleshooting / Re: Ardunio, on Mac OSX Intel on: September 20, 2006, 01:48:42 pm
This may be a dumb question, but can one use a USB Arduino on a mac, or is it only possible to use the serial one on a mac? I want to buy one of these jewels and start playing with it, just want to buy one I can use!

Never mind, apparently I can use USB by using the FTDI drivers. Am I correct?

Dave
12  Forum 2005-2010 (read only) / Interfacing / Re: How to connect SCP1000 pressure sensor on: December 27, 2009, 12:25:00 pm
If you're connecting to a 5V arduino board, check out this page at Spark Fun:

http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=65

It shows how(and why!) to hook up resistors so you don't toast the 3.3V device. I used the resistor network on mine, and usedthe 3.3V on the Decimilia for the power supply for the device. It works fine.
13  Forum 2005-2010 (read only) / Interfacing / Re: n00b SPI problem on: December 31, 2009, 12:46:38 pm
Willy,

Good to hear it works for you! A true validation of my code!

Greetings from Northern California. One of these days I have to make it out to Switzerland, my father worked for CIBA-Geigy (now Novartis) for 33 years and the company calendars were always filled with pictures of the alps. I am an avid hiker and they're on my to-do list.

Cheers,
Dave
14  Forum 2005-2010 (read only) / Interfacing / Re: n00b SPI problem on: December 30, 2009, 12:18:21 pm
Hi Willy,
Here is the code I use. It prints out in Centigrade. What helped me debug this was printing out the low and high parts of the pressure reading in hex, but I have since removed that. See if this works for you. Good luck!

Dave
Code:
// define spi bus pins
#define CSB 10 //  SLAVESELECT
#define SPICLOCK 13  // SCK
#define DATAOUT 11      //MOSI
#define DATAIN 12       //MISO

#define UBLB(a,b)  ( ( (a) << 8) | (b) )
#define UBLB19(a,b) ( ( (a) << 16 ) | (b) )

//Addresses
#define REVID 0x00      //ASIC Revision Number
#define OPSTATUS 0x04   //Operation Status
#define STATUS 0x07     //ASIC Status
#define START 0x0A      //Constant Readings
#define PRESSURE 0x1F   //Pressure 3 MSB
#define PRESSURE_LSB 0x20 //Pressure 16 LSB
#define TEMP 0x21       //16 bit temp

char rev_in_byte;          
int temp_in;
unsigned long pressure_lsb;
unsigned long pressure_msb;
unsigned long temp_pressure;
unsigned long pressure;

void setup()
{
  byte clr;
  pinMode(DATAOUT, OUTPUT);
  pinMode(DATAIN, INPUT);
  pinMode(SPICLOCK,OUTPUT);
  pinMode(CSB,OUTPUT);
  digitalWrite(CSB,HIGH); //disable device  
  
  SPCR = B01010011; //MPIE=0, SPE=1 (on), DORD=0 (MSB first), MSTR=1 (master), CPOL=0 (clock idle when low), CPHA=0 (samples MOSI on rising edge), SPR1=0 & SPR0=0 (500kHz)
  clr=SPSR;
  clr=SPDR;
  delay(10);
  Serial.begin(9600);
  delay(500);

  Serial.println("Initialize High Speed Constant Reading Mode");
  write_register(0x03,0x09);
}

void loop()
{
 
  rev_in_byte = read_register(REVID);
  
  pressure_msb = read_register(PRESSURE);
  pressure_msb &= B00000111;
  pressure_lsb = read_register16(PRESSURE_LSB);
  pressure_lsb &=0xFFFF;
  pressure = UBLB19(pressure_msb, pressure_lsb);
  pressure /= 4;
  pressure +=4500;    //correction in pascals to 1250 feet elevation, which is where I am at
  
  Serial.print(" P = ");
  Serial.print(pressure, DEC);
  
  temp_in = read_register16(TEMP);
  temp_in = temp_in / 2;
  Serial.print(", T x 10 = ");
  Serial.print(temp_in , DEC);
  Serial.println(" C");

  delay(1500);
}

char spi_transfer(volatile char data)
{
  SPDR = data;                    // Start the transmission
  while (!(SPSR & (1<<SPIF)))     // Wait for the end of the transmission
  {
  };
  return SPDR;                    // return the received byte
}


char read_register(char register_name)
{
    char in_byte;
    register_name <<= 2;
    register_name &= B11111100; //Read command
  
    digitalWrite(CSB,LOW); //Select SPI Device
    spi_transfer(register_name); //Write byte to device
    in_byte = spi_transfer(0x00); //Send nothing, but we should get back the register value
    digitalWrite(CSB,HIGH);
    delay(10);
    return(in_byte);
  
}

unsigned long read_register16(char register_name)
{
    byte in_byte1;
    byte in_byte2;
    unsigned long in_word;
    
    register_name <<= 2;
    register_name &= B11111100; //Read command

    digitalWrite(CSB,LOW); //Select SPI Device
    spi_transfer(register_name); //Write byte to device
    in_byte1 = spi_transfer(0x00);    
    in_byte2 = spi_transfer(0x00);
    digitalWrite(CSB,HIGH);
    in_word = UBLB(in_byte1,in_byte2);
    return(in_word);
}

void write_register(char register_name, char register_value)
{
    register_name <<= 2;
    register_name |= B00000010; //Write command

    digitalWrite(CSB,LOW); //Select SPI device
    spi_transfer(register_name); //Send register location
    spi_transfer(register_value); //Send value to record into register
    digitalWrite(CSB,HIGH);
}

15  Forum 2005-2010 (read only) / Interfacing / Re: n00b SPI problem on: December 29, 2009, 11:58:21 am
Willy,
read my post, just before yours. Change the read_register16 function to a unsigned long from a float. That helped me.


unsigned long read_register16(char register_name)
Pages: [1] 2