Show Posts
Pages: [1] 2 3 ... 74
1  Forum 2005-2010 (read only) / Troubleshooting / Re: error: 'String' does not name a type In function on: August 28, 2010, 04:57:26 am
The new String (version 0.9 I think) IS the old WString (or TextString).... You might have issues in using both of them. There is no need for this.
2  Forum 2005-2010 (read only) / Troubleshooting / Re: error: 'String' does not name a type In function on: August 27, 2010, 02:52:21 pm
You most likely forgot to
#include <String.h>
3  Forum 2005-2010 (read only) / Troubleshooting / Re: Newbie Seeking Guidence on Software and Hardware on: September 23, 2010, 05:55:38 pm
http://www.arduino.cc/en/Reference/PROGMEM

What you do is fine, but also error prone... It is the missing "tool" I was referring to :-)

Edit:
As you have a lot of RAM memory in the MEGA it might even suffice to keep everything in the RAM. This will simplify programming considerably.
The compiler generates initialization code to copy all presets in the RAM...

Edit2:
I just read your paragraph about "involvement". I see the danger that the configuration might become unmaintainable by permanent and uncontrolled changes
4  Forum 2005-2010 (read only) / Troubleshooting / Re: Newbie Seeking Guidence on Software and Hardware on: September 23, 2010, 05:34:52 pm
Blocking.
This is a software issue. The print-library will wait until all characters have been sent. This is not acceptable for a tight main loop! You have to find a work-around (not really difficult)

Watchdog.
I should recommend the internal watchdog - see Arduino playground example. External solutions can comprise anything from a second processor, downto a retriggerable one-shot, in the easiest case a cap to be pulse charged, similar to your own idea.

EEPROM
Tables in EEPROM make sense if you have to put your code under strict revision control, and you have a tool to generate an EEPROM table. I think this is not worth the trouble. You can include all configuration tables in the FLASH area (C-tag PROGMEM)... All right, apart from the system has to be dynamically re-configured
5  Forum 2005-2010 (read only) / Troubleshooting / Re: Newbie Seeking Guidence on Software and Hardware on: September 23, 2010, 04:20:25 pm
Quote
* Should I fuss with interrupts?  Or should I just write one big loop that goes on until power is shut off?  I could, for instance, tie my switch changes to interrupt pins...
In your case with MANY and systematic I/O operations a loop will allow you a much better code overview and also precise timing. From your description I see no need for special interrupts at the moment, but this can be added later. Not thst the serial transmission to the PC is blocking; this has to be carefully examined by you.

Quote
* Should I store data on my system layout and write simplified code that processes this data, or should I hard code it all into instruction memory?
I think your application looks like "table driven".

Quote
* How should I handle memory and instruction memory faults?  I need to understand the possible failure modes and be able to address them with additional components.
You have no protection against software issues. But you could use the watchdog (or even an external watchdog) to restart your system when lost.... An initial "sanity check" (or "BITE") would be nice, but needs additional external hardware...
6  Forum 2005-2010 (read only) / Troubleshooting / Re: Newbie Seeking Guidence on Software and Hardware on: September 23, 2010, 04:08:43 pm
You generally have 6 problem zones with microcontroller systems (note that I do not talk of the chip, but of the complete assembly of PCBs in a housing).

(1) Validity of the (VLSI) chips under normal operation conditions (temperature, supply voltage, input voltage, output current), This is generally very high. So there is no need for memory consistancy checking or such for hardware reasons.
(2) Stability of supply voltage. Tricky matter if you have to reliably handle powerdrops...
(3) System design with respect to I/O. This is often a main problem zone. You have to secure against high input voltage, output shortcuts, RF interference. This can cost you $5 per pin. I say this to show you that the price of a naked Arduino system is not an relevant asset item. However there are also low cost solutions. My recommendations are 74HC4049 for inputs and ULN2308 for outputs. But this is low cost and might not suffice....
(4) Quality of PCBs, wiring, and mechanical build, especially wrt to ground connections, temperature, moisture, and EMC...
(5) Connectors
(6) Correctness of Software. My guess is that 90% of your trouble will be here :-)
7  Forum 2005-2010 (read only) / Troubleshooting / Re: 24LC256 - wire library problem on: September 27, 2010, 03:12:47 am
(1) Your "multiples of 16 issue" is funny... A bug in your code?
(2) You can easily increase the buffer size in the Wire lib if you wish. But why?

Edit:
----
When using Page Write mode, the addresses will roll-over at 64 byte bounderies, but that does not seem to be your issue.
8  Forum 2005-2010 (read only) / Troubleshooting / Re: Fast Data Type on: September 26, 2010, 04:15:23 pm
Quote
I think you want something like...
Reading his last posting, I think he does not really know what he wants  ;D
9  Forum 2005-2010 (read only) / Troubleshooting / Re: Fast Data Type on: September 25, 2010, 09:35:05 am
Quote
ROR >> LOL
But that IS cool  8-)
10  Forum 2005-2010 (read only) / Troubleshooting / Re: Fast Data Type on: September 25, 2010, 06:15:00 am
Using assembly code is not fair  :o
11  Forum 2005-2010 (read only) / Troubleshooting / Re: Fast Data Type on: September 25, 2010, 05:04:29 am
You should use some "loop unrolling", e.g.
Code:
for (byte i=0; i<64;++i){
 byte b = (PIND>>theBit)&1;
 b |= (PIND>>(theBit-1))&2;
 b |= (PIND>>(theBit-2))&4;
 b |= (PIND>>(theBit-3))&8;
 b |= (PIND>>(theBit-4))&16;
 b |= (PIND>>(theBit-5))&32;
 b |= (PIND>>(theBit-6))&64;
 b |= (PIND>>(theBit-7))&128;
// change shift direction if theBit <7 :-)
theData[i]=b;
}//for
12  Forum 2005-2010 (read only) / Troubleshooting / Re: Dimmer example question on: September 24, 2010, 10:07:08 am
Alas, this good switch is not available on standard Arduinos (but on Seeeduinos only)
13  Forum 2005-2010 (read only) / Troubleshooting / Re: Fuzzy logic controller on: September 21, 2010, 02:21:22 am
Closed loop still needs some "algorithm". As the feed-back here is considerably delayed by software this is not simple. A "P" rule is no longer appropriate, a common "PID" rule is also not the best thing for an extended reaction time.

Still I don't see where the fuzziness might step in here for help, as the behaviour of the regulator is well defined....
14  Forum 2005-2010 (read only) / Troubleshooting / Re: Fuzzy logic controller on: September 19, 2010, 04:38:11 am
... you need not necessarily do it using UML.
15  Forum 2005-2010 (read only) / Troubleshooting / Re: How to control the TV as the remote control on: September 11, 2010, 03:28:15 am
Quote
complex...
Not really..."Straight forward", I should say... But - alas - there is a variety of vendor protocols... Most is hidden in IRremote anyway...
Pages: [1] 2 3 ... 74