Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: Roll-Your-Own Serial output && Bitwise operations..... (Not for beginners) on: March 02, 2011, 02:40:10 am
What I came up with: (Basically I'm just incrementing the Loop counter by a factor of 2, ensuring I can always use it as a bitmask)

  for (long _CLK = 1; _CLK <= DATA_width; _CLK *=2)
  {
    //delayMicroseconds(halfBit9600Delay);

    //Set the DATA line accordingly (Where the magic happens)
    if(_CLK & _ANGLE)
    {
     digitalWrite(tx, HIGH); 
    } 
 
    // turn the pin on:
    digitalWrite(CLK, HIGH);   
    delayMicroseconds(halfBit9600Delay);                 
   
    // turn the pin off:
    digitalWrite(CLK, LOW);
    digitalWrite(tx, LOW);   
   
    //delayMicroseconds(halfBit9600Delay);
  }
2  Using Arduino / Programming Questions / Roll-Your-Own Serial output && Bitwise operations..... (Not for beginners) on: March 02, 2011, 12:01:15 am
I am designing my own serial communication for a hardware circuit that takes 16 bits of data serially. (Think Aircore Gauges)

Outputs I need: CLOCK, CHIPSELECT, DATA (this requirement negates using any of the built-in serial libraries)

CLOCK and CHIPSELECT are easy-shmeazy. DATA, not so much (Yet)

I have an Integer I need to send to this device.

Let's use an INT of 20. (or  0b0000000000010100)

I have a loop that executes 16 times, I need to Bitwise AND to build my DATA stream:

My LOOP uses an interim INT value that increments from 1 thru 16, then back to 1 when it is finished.

My question is: How can I test each individual bit in the INT I want to send to see if it's a 1 or 0 and then set my DATA line accordingly?

Desired output:

on CLK 1: DATA = 0
on CLK 2: DATA = 0
on CLK 3: DATA = 1
on CLK 4: DATA = 0
on CLK 5: DATA = 1
on CLK 6: DATA = 0






 






3  Using Arduino / Interfacing w/ Software on the Computer / Using Visual Studio (C++) on: February 10, 2011, 08:50:58 pm

I'm looking for a way to send software values to the Arduino.

I have an interface app written in C++ that extracts flight data from Microsoft's Flight Simulator. (Think Engine RPM in this case)

Much like a Tach, I want to send the RPM (0-2800) value via a C++ app (Or C#) to the Arduino, which will increase/decrease the on/off freq on a digital output.

Has this been done in other arenas?
4  Using Arduino / Project Guidance / Sourcing MLX10407 ICs for driving Aircores on: February 08, 2011, 01:50:35 pm
Where can I find these chips? I can find enough datasheets to wallpaper my house but can't find a supplier.

My newest project:
The beginnings of my F-16 Falcon engine gauges
http://anthonyscott.zenfolio.com/img/s1/v21/p920629136.jpg
5  Using Arduino / Project Guidance / Is this an Air-core interface? on: January 28, 2011, 10:57:12 pm
I am hunting for a viable solution to drive air-core gauges with data from Microsoft's Flight Simulator via FSUIPC. I have written several applications that pull data from FSX and sent to various interfaces but never to an air-core gauge.

In particular, I want to drive self-zeroing aircores. Is this possible with the Arduino interface?
Pages: [1]