Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Shield on: January 21, 2013, 11:25:44 pm
those are free first off.
Typically your router will have an option in it to automagically update those domains with your current ip address.
2  Using Arduino / Networking, Protocols, and Devices / Re: spi, registers, and values on: January 21, 2013, 10:59:15 pm
Here is the code that I have. I can read from the sensor fine, but it's still the default 1 sample per second. I would like to get 128 samples per second. Thanks!

Code:
#include <SPI.h>

int ss=10;
int ax, ax_l, ay, az;
int datax, datay, dataz;

void setup()
{
  Serial.begin (9600);
  pinMode(ss, LOW); //
  SPI.begin(); //
  SPI.setDataMode(SPI_MODE3);
  SPI.setBitOrder(MSBFIRST);  
  SPI.setClockDivider(SPI_CLOCK_DIV16);
  
  digitalWrite(ss, LOW);
  SPI.transfer(0x38);
  SPI.transfer(0x0002);
  digitalWrite(ss, HIGH);
  delay(5);
}

void loop()
{
 digitalWrite(ss,LOW);
 ax=SPI.transfer(0x0C);
 ax_l = SPI.transfer(0);
 digitalWrite(ss,HIGH);

 datax=(ax<<8) | ax_l;
 Serial.print("X Accel: ");
 Serial.println(datax, DEC);
 delay(25);
}
3  Using Arduino / Networking, Protocols, and Devices / spi, registers, and values on: January 21, 2013, 09:39:58 pm
Hello all, I have a ADIS16210. I am able to read from it all right, but my question comes about how do I write to the registers? I have a specific address, and a specific value, but how do I program the Arduino to do that?
Is is just 2 consecutive spi.transfers?
Here is the datasheet http://www.analog.com/static/imported-files/data_sheets/ADIS16210.pdf
look at table 23

Thanks,
Mike
4  Using Arduino / Microcontrollers / Crystals and 2 chips on: October 11, 2012, 10:23:36 pm
Hello,
Is it possible to run 2 chips off of one crystal? I would like to run two AVR's off of 1 16Mhz crystal. Can they be run in parallel? Do I need to modify the load caps?

Thanks
5  Using Arduino / General Electronics / Re: What is this component called? on: July 01, 2012, 09:10:01 pm
they're just .1" headers. http://www.digikey.com/product-detail/en/TS-132-T-A/SAM1112-32-ND/1105462
6  Using Arduino / General Electronics / Re: pnp MOSFET on: July 01, 2012, 08:55:51 pm
I understand the Arudino can not turn it back off once it comes on with out addition hardware. I'm just trying to get a grasp of what it's looking for. Can I just connect the gate to source to turn it off and ground to turn it on?
7  Using Arduino / General Electronics / Re: pnp MOSFET on: July 01, 2012, 07:24:20 pm
What is the purpose of calling it logic level then? Just because it is less than 5 volts difference from the source? Also, do I need a resistor on the gate line, or can I just connect it to source to turn it off and 0v to turn it on?
8  Using Arduino / General Electronics / pnp MOSFET on: July 01, 2012, 07:11:51 pm
Hello, I am looking at the NP50P04SDG PNP Mosfet. It is a logic level device, but I have a quick question. In the datasheet it says the gate to source threshold voltage is about -1.6v.  Is that 1.6 volts under source? So if I had 12 volts going in i'd have to give it at least 10.4 to make sure that it's off? The 0volts would make the mosfet turn on. Am I thinking right here?
Thanks, Mike
9  Using Arduino / Networking, Protocols, and Devices / Re: k-line(ISO9141, OBDii) checksum on: June 01, 2012, 09:48:26 am
I don't have any code yet, as I am trying to figure out what I need to be able to interface it. As far as hardware goes, to interface K-line you will need a level converter. I have a freescale MC33660EF. That then connects directly into the micro's UART port. The tricky part is finding the baud rate. You can easily do that with an oscilloscope however.
10  Using Arduino / Networking, Protocols, and Devices / Re: k-line(ISO9141, OBDii) checksum on: May 31, 2012, 02:27:07 pm
I am about 99% sure that it is k-line. That is what the pin on the ECU is called that goes to the dash. Here is some more information that I have found. http://www.alfa145.co.uk/obd/14230-2s.pdf I can't quite follow what it's trying to say.
11  Using Arduino / Networking, Protocols, and Devices / Re: k-line(ISO9141, OBDii) checksum on: May 31, 2012, 01:54:37 pm
What is the checksum there? 5F and 7D? Or something else?
The checksum is indeed 5F and 7D.

From the code that you posted, it looks like you just add them all up and call it a day. Is that what I should be doing?
12  Using Arduino / Networking, Protocols, and Devices / Re: k-line(ISO9141, OBDii) checksum on: May 30, 2012, 03:12:46 pm
Thanks for that. But how would I go about calculating it by hand?
13  Using Arduino / Networking, Protocols, and Devices / k-line(ISO9141, OBDii) checksum on: May 30, 2012, 08:52:20 am
Hello all, I am looking for some help on calculating the checksum for transmitting some data to the dashboard on my car. I have read some samples and can transmit them back into the dash and make it work. The part where I get stuck is if I try to change some numbers in the stream it will just ignore the frame because the checksum is incorrect.
I have a few examples of captures.
12 00 00 00 00 56 59 5F
7A 00 00 10 00 38 41 7D
From what I read it's a simple sum, but I can not get the checksum to come out correctly. Does anybody have and ideas on how this works?
Thanks!
14  Using Arduino / Programming Questions / Re: Combine numbers within array on: October 26, 2011, 04:30:47 pm
Thank you all, It works like a charm!
15  Using Arduino / Programming Questions / Re: Combine numbers within array on: October 26, 2011, 04:15:56 pm
so could I just go
x = (data[4] << 8 ) + data[5];  ? (no space between the 8 and ))
Pages: [1] 2 3 4