Go Down

Topic: Question for Nick Gammon (Read 535 times) previous topic - next topic

kas

Mar 05, 2013, 06:02 pm Last Edit: Mar 05, 2013, 06:05 pm by kas Reason: 1
Hi Nick,

I made a 328P-PU Arduino compatible minimal board based on your super tutorial
http://www.gammon.com.au/forum/?id=11637

I uploaded:
- "board detector" sketch
- bootloader programming sketch (8 MHz without a crystal)
Everything went well and I finally loaded up the basic Blink example

...
 digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
 delay(2000);               // wait for 2 seconds
 digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
 delay(2000);               // wait for 2 seconds
...

The LED turn ON for 4 seconds and OFF for 4 seconds
What am I doing wrong ??
Is it related to the 8 MHz clock ??

Thanks for your assistance

kf2qd

Is you chip running of an external crystal? or off the internal clock? It sounds like you compiled the program using a configuration that is expecting a 16Mhz clock, but it is actually running a 8Mhz clock.

kas

The chip is running 8Mhz from the internal clock

Based on your comments, I changed board for the LilyPad Arduino w/ ATmega328 (8MHz)
and all is well  :) 

Thanks for your help

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy