Loading...
  Show Posts
Pages: 1 ... 50 51 [52] 53 54 55
766  Using Arduino / General Electronics / Re: Current question on: March 24, 2011, 06:46:45 am
Oh, a HUGE difference then, thank you!
767  Using Arduino / General Electronics / Current question on: March 24, 2011, 05:55:40 am
Hi All...

So, if I have a chip that uses .65 micro amp (.65 uA) and another that uses 100 nA, which is using less power? I don't know what an "nA" is...

Thanks...
768  Using Arduino / Storage / Re: Arduino Uno and ATMEL memory chip using SPI on: March 24, 2011, 02:48:56 am
Just wondering, why did you select the 25 series chips over the 45 series?
769  Using Arduino / Storage / Re: Looking for schematic for an SD card to Arduino interface on: March 20, 2011, 05:34:04 pm
Thats very helpful, thanks!

So from looking around, it seems that an SD card speaks SPI natively and all we need to do to talk to an Arduino is voltage level conversion, either with a level converter chip or some resistors.  I found this part on SparkFun:

http://www.sparkfun.com/products/136

I also found this board:

http://www.sparkfun.com/products/9802

This one just has a level converter chip to change the 5.0V signals to 3.3V.  Ther is also a lot of info here that implies this is the case.

I am also looking to see if I can use a CF card. I'm actually trying to figure out all the differences between SD, MMC, microSD, CF and so on.





770  Using Arduino / Storage / Looking for schematic for an SD card to Arduino interface on: March 20, 2011, 02:17:38 am
I all...

I looked around a bit, but nothing very clear was found. I am thinking of adding an SD card to a project, and wondering how I interface one to an Arduino electronically? What circuitry needs to go between the SD card socket and the Arduino? Does it use SPI or something else?

Thanks...
771  Using Arduino / General Electronics / Re: what is a tempature compensated soldering iron? on: March 02, 2011, 10:35:55 pm
Thanks guys.
772  Using Arduino / General Electronics / Re: what is a tempature compensated soldering iron? on: March 02, 2011, 10:31:03 pm
Thanks! So we tell it what temp to maintain and it does it?
773  Community / Bar Sport / Re: Feeling stupid on: March 02, 2011, 10:18:51 pm
Thanks Rob, is it source level debugging (so I can step through the actual C/C++ code) or is it assembly level?
774  Using Arduino / General Electronics / what is a tempature compensated soldering iron? on: March 02, 2011, 10:15:32 pm
Hi All...

What is a tempature compensated soldering iron? Does this mean it only gets as hot as needed so as not to damage the components? How does it know?
775  Community / Bar Sport / Re: Feeling stupid on: March 02, 2011, 10:10:49 pm
Along these lines, I would love to use the JTAG port on an Atmel for actual debugging. i did some searching here and learned that the JTAG fuses are off by default, but didn't find much more than that. Does anyone know how I can use JTAG to debug code that is actually running on the CPU?
776  Using Arduino / Storage / Re: Big EEPROM shield? on: March 02, 2011, 03:32:40 pm
PM sent, enjoy!
777  Using Arduino / Programming Questions / Re: Reading .h and .ccp files on: February 27, 2011, 12:03:14 pm
Another very nice free programming editor is here:

http://www.crimsoneditor.com/
778  Using Arduino / Programming Questions / Re: declaring variables in the loop? (a variable scope question) on: February 24, 2011, 12:22:54 am
It would be unusual to declare a varible as you did, but if you do then it will work and the varible will be set back to the initial value each time that line is executed.

More normal would be this:

for(int i=0; i++; i<10)
{
   // do something with i or test it
}

Or maybe:

int i=0;
while(i<10)
{
   // do something with or without i

}

779  Using Arduino / Programming Questions / Re: Code Book on: February 15, 2011, 05:13:18 pm
A computer language is a tool, and like all tools, you select the best one for the job at hand. For learning generic computer programming, I like Java. C/C++ are more complex for several reasons, and these reasons make them more popular. Jave is not going to run on an Arduino, but that's fine for your purposes (learning).

Things like PHP, PERL, Python and so on are handy, but you can learn some bad habits playing with them. Java anc C/C++ are what are referred to as "type safe" languages. That's a big advantage, because the compiler helps catch errors that can otherwise be hard to find. Java handles what is called "dynamic memory allocation" for you, C/C++ does not. That makes C/C++ more powerful and a better choice when that kind of flexability is needed, but also makes writing insidious bugs very easy.

Bottom line, you'll learn good habits with Java and C/C++, and those skills will position you to quickly adapt to PHP, Python and so on. Its a lot harder to go from say PHP to C.




780  Using Arduino / Storage / Any SPI / Flash experts out there? on: February 15, 2011, 04:50:20 am
Hi All...

I am trying to get my Uno to talk to a Winbond 8MB Flash chip via SPI. I checked the leading edge/falling edge stuff and the other things that need to be considered on SPI. The code below simply tries to read the status register, set write enable, then read the status register again. It then looks for a change in the status register.

The code below executes the same whether the flash chip is hooked up or not. I'm pretty sure I have it hooked up right. Its pretty simple actually. I'm hopeing someone can help me find the issue before I decide my chip is bad. The data sheet for the chip is referenced int eh code, in a comment.

Thanks!

Code:
// Some code to play with the Winbond flash

#define DATAOUT 11//MOSI
#define DATAIN 12//MISO
#define SPICLOCK 13//SCK
#define SLAVESELECT 10//SS
#define WP 8//Write protect

// Opcodes
// Taken from Winbond datasheet:
// http://www.winbond.com/NR/rdonlyres/591A37FF-007C-4E99-956C-F7EE4A6D9A8F/0/W25Q64BV.pdf

#define WREN 0x06 // Write Enable
#define WRDI 0x04 // Write Disable
#define RDSR1 0x05 // Read Status Register 1
#define RDSR2 0x35 // Read Status Register 2
#define WRSR 0x01 // Write Status Register
#define READ 0x03 // Read Data
#define READID 0x90 // Read Manufacturer / Device ID
#define READUNID 0x4B // Read Unique ID Number (factory set 64-bit ID) - optional feature on chip

void setup()
{
  Serial.begin(9600);
 
  pinMode(DATAOUT, OUTPUT);
  pinMode(DATAIN, INPUT);
  pinMode(SPICLOCK, OUTPUT);
  pinMode(SLAVESELECT, OUTPUT);
  pinMode(WP, OUTPUT);
 
  digitalWrite(SLAVESELECT, HIGH); //Disable device
  digitalWrite(WP, HIGH); // Disable write protect

  // Set CPUs SPI status register to 0101 0000
  SPCR = (1 << SPE) | (1 << MSTR);
 
  // Read any junk data from status registers
  byte clr;
  clr = SPSR;
  clr = SPDR;
 
  byte readA = 0;
  byte readB = 0;
  byte readC = 0;
 
  delay(100);
 
  Serial.print("Reading status register\r\n");
 
  digitalWrite(SLAVESELECT, LOW);
  readA = spiTransfer(RDSR1);
  digitalWrite(SLAVESELECT, HIGH);

  delay(100);

  Serial.print("Sending write enable\r\n");
  digitalWrite(SLAVESELECT, LOW);
  byte response = spiTransfer(WREN);
  digitalWrite(SLAVESELECT, HIGH);

  Serial.print("Reading status register\r\n");

  delay(100);
 
  digitalWrite(SLAVESELECT, LOW);
  readB = spiTransfer(RDSR1);
  digitalWrite(SLAVESELECT, HIGH);

  if(readA != readB)
  {
    Serial.print("Values differ\r\n");
  }
  else
  {
    Serial.print("Values the same\r\n");
  }
 
}


void loop()
{
 
}

byte spiTransfer(volatile byte data)
{
  SPDR = data;
 
  while (!(SPSR & (1<<SPIF)))
  {
  };
 
  return SPDR;
}

Pages: 1 ... 50 51 [52] 53 54 55