Show Posts
Pages: [1] 2 3 ... 972
1  Using Arduino / Project Guidance / Re: Pin Change interrupt debounce on: Today at 06:23:11 pm

Interrupt service routine is empty.  Handle the pushbutton in loop as you normally do.
2  Using Arduino / Microcontrollers / Re: Standalone Atmega328 locking up on: Today at 06:14:59 pm

In a house, insulation in the walls separates the interior of the house from the outside.  The capacitors act like somewhat like house insulation; electrically separating (isolating) what is on one side from what is on the other side.  I assume the capacitors you are seeing are different sizes.  The different sizes provide isolation at different frequencies.

The 0.1 uF capacitors near the processor are a great example.  The processor is electrically fairly quiet until the system clock ticks.  At that moment there is a flurry of activity resulting in the processor drawing significantly more current ("significantly more" being several milliamps).  If the power supply and power delivery was perfect, those oscillations between quiet and flurry would not matter.  But neither is perfect.  The result is that the oscillations show up in other parts of the circuit were they could cause problems.  The 0.1 uF capacitors help to isolate the oscillations to just the part of the circuit that includes the processor.
3  Using Arduino / Microcontrollers / Re: Standalone Atmega328 locking up on: Today at 05:23:12 pm

Even an expert may have trouble determining exactly why the resistor would cause problems.  As simple as it is, compared to a modern PC processor, an AVR processor is still a very complicated device.

You are welcome.  Glad to know you have it working.
4  Using Arduino / Project Guidance / Re: Inceasing PWM frequency on: Today at 05:09:29 pm

Suspect you're modifying the wrong time.
5  Using Arduino / Microcontrollers / Re: Standalone Atmega328 locking up on: Today at 05:00:46 pm

I apologize.  It does say that.

Remove your "low-pass filter" from pin 20.  Connect pin 20 directly to power.  Exactly the same as you have VCC (pin 7) connect.

Both GND pins need to be connected to ground (pin 8 and pin 22).

You need to have a 0.1 uF capacitor connected between VCC and GND (pins 7 & 8) as close to the processor as possible.

You need to have a 0.1 uF capacitor connected between AVCC and GND (pins 20 & 22) as close to the processor as possible.

This document has more details if you are interested.
6  Using Arduino / Microcontrollers / Re: Standalone Atmega328 locking up on: Today at 04:40:35 pm
And, the Atmega has an "AVcc" pin on it...

Uh huh.

Quote
When it talks about hooking up pin 20, it mentions needing a low pass filter for analog.

Low pass filter on pin 20?  Are you certain?

Quote

Read it again.
7  Using Arduino / Microcontrollers / Re: Standalone Atmega328 locking up on: Today at 04:14:51 pm

Did you bound clr correctly or are you still overrunning the array?

Quote
...and for hooking up AVCC, I have a 100ohm res to power and a 0.1uF cap to ground...

What?
8  Using Arduino / Installation & Troubleshooting / MOVED: Serial monitor behaviour on: Today at 03:41:46 pm
This topic has been moved to Arduino Yún.

http://forum.arduino.cc/index.php?topic=262758.0
9  Using Arduino / Installation & Troubleshooting / MOVED: Problem to compile MD25_example on: Today at 01:14:34 pm
This topic has been moved to Programming Questions.

http://forum.arduino.cc/index.php?topic=263415.0
10  Using Arduino / Microcontrollers / Re: Different bitrate for serial TX and RX? on: Today at 01:00:08 pm
Code:
while ( Serial.available() )
{
  Serial.read();
}
11  Using Arduino / Microcontrollers / Re: Standalone Atmega328 locking up on: Today at 12:57:36 pm

clr is unbounded.
12  Using Arduino / Programming Questions / Re: Trouble with PID library and fan control on: Today at 02:06:21 am

I assume the fan is meant to cool.

Quote
PID myPID(&Input, &Output, &Setpoint,Kp,Ki,Kd, DIRECT);

If Setpoint is 15 and Input is 17 then the error is Setpoint - Input = -2.  In this situation, the fan should be on to bring the Input down to 15.

This is from the header file...

Quote
DIRECT means the output will increase when error is positive. REVERSE means the opposite.

The error is negative and you specified DIRECT.  The PID algorithm will try to drive the output more negative.  The opposite of what you want.
13  Using Arduino / Programming Questions / Re: Trouble with PID library and fan control on: Today at 01:53:29 am
I played around with the tuning parameters...

That the word "parameter" includes an "s" indicates you are making a mistake.  You should only be working with the Proportional parameter at this point.
14  Community / Gigs and Collaborations / Re: Help and get reward .... on: Today at 12:13:01 am

Sounds suspiciously like a third or fourth year college assignment.  Is it?
15  Using Arduino / Programming Questions / Re: Trouble with PID library and fan control on: August 26, 2014, 06:16:22 pm
Code:
void loop(void)
{
...
  Serial.print("Temperature C = ");
  Serial.println(Input);
  Serial.print("Output = "); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  Serial.println(Output); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
}
Pages: [1] 2 3 ... 972