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
|
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 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  ______ 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
|
|
|
|
|
7
|
Products / Arduino Due / Re: Due and SPI library and SPI pins?
|
on: Today at 12:22:51 am
|
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. 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
|
|
|
|
|
10
|
Community / Gigs and Collaborations / Re: 7 segment display panels for diesel motors
|
on: May 23, 2013, 09:54:42 am
|
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? 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. if you think you're grey mate, you could use my hair for headlights! I'm just planning ahead  ______ 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  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. 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
|
|
|
|
|
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. 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. Design in Eagle CAD I'd rather chew my own arm off than use Eagle, but hey, that's just me  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. No surface mount That's easy. PCB size no greater than 5cm x 2.5 cm I'm pretty sure 4x 1" displays will be larger than 50mm. Discussion on the possibility of using an ATTINY Sure, but what will the Tiny be doing? _____ Rob
|
|
|
|
|