Loading...
  Show Posts
Pages: [1] 2 3 ... 464
1  Products / Arduino Due / Re: Due and SPI library and SPI pins? on: Today at 03:18:17 am
Quote
So the docs are in error then?
I would say so, probably a cut-n-paste from the Mega or something where that header was ICSP as well as SPI.

I gather you are referring to the small graphic that shows the pinout of the header, the fact that the "ICSP" label almost matches the location on the board (relative to the header, EI below whereas the SPI label is above) makes it really seem to refer to the 16U programming port and not the SPI header.

_____
Rob
2  Using Arduino / Project Guidance / Re: shift registers ,LED's ,timer on: Today at 02:51:41 am
I think this should do what you want

Code:
byte patterns[] = {
  //  RBGW
     B0001, 
     B0010,
     B1100,
     B0011,
     B1000
};

byte sequence[] = {1,3,0,4,2};  // as many as you like

//             W  B   G  R
byte pins[] = {3, 6, 10, 4}; // logical pin numbers, WBGR order

int curr_seq = 0;

const int N_LEDS = 4;
const int N_SEQS = sizeof(sequence) / sizeof (sequence[0]);

void setup() {
  for (int i = 0; i < N_LEDS; i++) {
    pinMode (pins[i], OUTPUT);
  }
}

void loop () {

  if ((millis() % 500) == 0) {
    every_500_ms ();
  }

}

void every_500_ms () {

  byte pattern = patterns[sequence[curr_seq]];

  for (int i = 0; i < N_LEDS; i++) {
    digitalWrite (pins[i], (pattern & 1) ? HIGH : LOW);
    pattern >>= 1;
  }

  if (++curr_seq > N_SEQS) curr_seq = 0;

}

You may need more but this compiles and should run although I can't test it.

______
Rob
3  Using Arduino / Project Guidance / Re: SRAM interface question on: Today at 01:55:08 am
Yes, I'm assuming static data so knowing where free space is would not be an issue.

A "variable" could use offsetof() to determine it's location in the struct and therefore the XM, but this approach would need functions for the various variable types and I don't know how you would differentiate between variables of the same type.

It would get very messy I think unless a C++ guru can advise otherwise.

Certainly an array of same types would be a lot easier.

And of course if you can fit the struct in internal RAM there's little point in having the external RAM in the first place smiley

______
Rob
4  Using Arduino / Project Guidance / Re: SRAM interface question on: Today at 01:30:42 am
My C++ is very rusty to non-existent but I reckon you could create a class with an internal data structure as required, then overload the = operator with code that read/writes to the external RAM so at the source level it almost looks like normal code. Like

XM.some_var = 1234;



______
Rob
5  Using Arduino / Project Guidance / Re: shift registers ,LED's ,timer on: Today at 01:22:15 am
I think I'm following, how many steps will there be, that will affect how it's done.

EDIT: I didn't notice the extra post by DVDdoug, I'll read that now.

______
Rob
6  Using Arduino / Programming Questions / Re: Arduino, 1949 on: Today at 12:26:06 am
Quote
or have been set aside for one reason or another
Such as a corporate or political vested interest.

______
Rob
7  Products / Arduino Due / Re: Due and SPI library and SPI pins? on: Today at 12:22:51 am
Quote
One of them is located just behind the FTDI adapter chip and is labeled ICSP
The Due does not have an FTDI chip, it uses an Atmega16u2. The first header you refer to is a programming header for this Mega should you even need to reflash it.

Quote
The other is located immediate adjacent to the SAM3X chip next to the infinity symbol and Arduino Due logo silk-screened onto the top side of the board.
This is the actual SPI header and AFAIK the only access you have to the SPI port and therefore this is the header used by the SPI libraries.

______
Rob
8  Using Arduino / General Electronics / Re: Converter Current 4 to 20mA to 0 to 5V on: May 23, 2013, 10:48:11 am
Linear optos work by feeding back to a circuit (usually an opamp) on the isolated side, it's not clear how they would be appropriate here.

_____
Rob
9  Community / Bar Sport / Re: 1 megabit SRAM for SPI or parallel interface. on: May 23, 2013, 10:43:44 am
Hmmm, interesting chip. Now I'm trying to think of a use for it smiley

______
Rob
10  Community / Gigs and Collaborations / Re: 7 segment display panels for diesel motors on: May 23, 2013, 09:54:42 am
Quote
Min width for 1" is 24mm (x 4 = 100mm). There goes that one out the window....
Any reason you can't go to a larger board?

Quote
Just had a quick learning experience with EC; I thought it was good. Any other suggestions?
Not really, a lot of people are happy with Eagle, maybe you should learn that. There are a few free/cheap packages like DesignSpark etc but I don't know anything about them.

Code:
if you think you're grey mate, you could use my hair for headlights!
I'm just planning ahead smiley

______
Rob
11  Development / Other Hardware Development / Re: Based upon the type of projects you do what FPGA would you combine with your Ard on: May 23, 2013, 09:49:33 am
I can't answer exactly but recently I designed a board with a Lattice MachX02-2000, that's 2000 LUTs and I figured that was enough.

With that chip you can do a UART for example with 600 LUTs I think.

But I have to say I'm not that up to speed with FPGAs these days, and the  MachX02-2000 has the same pinout as the 7000 so I had an out if I ran out of logic.

_____
Rob
12  Using Arduino / Project Guidance / Re: shift registers ,LED's ,timer on: May 23, 2013, 06:22:30 am
Ok I think I've got it, I was reading your 120bps as 120Hz, big difference smiley

There are probably a 1000 ways to do this but here's my first thought.

If the number of sequences is not large (say < 500) you could have an array of bytes that holds bit patterns for your 4 LEDs.

Every .5 secs you read the next value from the array and write the value to the 4 pins controlling the LEDs.

Code:
byte seq_array[] =

//      RBGW
   B00001000,  // first pattern
   B00000100,
   B00001000,
   B00000001,
   B00000100,
   B00000010,
   B00001000,
   B00000001,  // first 3 in seq for 3 beats
   B00000010,
   B00000100,
   B00000000,  // all off for 3 beats
   B00000000,
   B00000000,
   B00000010,  // last 3 in seq for 3 beats
   B00000100,
   B00001000
};

I still don't know if I got the sequence you described but the above should be able to do any sequence.

If you think this is on the right track we can fill in the blanks.

_____
Rob

13  Using Arduino / Programming Questions / Re: Use reset pin as I/O pin on: May 22, 2013, 07:40:44 pm
I don't know for sure but I think you'll find that the internal circuitry looks at the RST pin state to determine what to do, it doesn't just rely on the fact that it is in the process of "resetting".

Also I would bet that when that fuse is set it doesn't bother to look at the pin at all.

_____
Rob
14  Using Arduino / Programming Questions / Re: Use reset pin as I/O pin on: May 22, 2013, 06:57:35 pm
I use an STK500 dev board for HV programming, it's a bit fiddly but not something one has to do very often normally.

______
Rob
15  Community / Gigs and Collaborations / Re: 7 segment display panels for diesel motors on: May 22, 2013, 06:58:22 am
I think you could do this best with an AS1108 driver on each board, these can be daisy-chained so the hardware for each module is simple with no processor required.

Quote
Same PCB to suit both 0.56" and 1.0"
This might be tricky, probably OK but will need some research into displays to find some with pinouts that can co-exist like that.

Quote
Design in Eagle CAD
I'd rather chew my own arm off than use Eagle, but hey, that's just me smiley

Quote
Each PCB adressable
Not necessary in the normal sense of the word if you use chips like the AS1108, addressing is implied by the position in the daisy chain.

Quote
No surface mount
That's easy.

Quote
PCB size no greater than 5cm x 2.5 cm
I'm pretty sure 4x 1" displays will be larger than 50mm.

Quote
Discussion on the possibility of using an ATTINY
Sure, but what will the Tiny be doing?

_____
Rob



Pages: [1] 2 3 ... 464