Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Interfacing / Re: Initializing timer registers on 16bit counter? on: January 24, 2011, 12:51:13 am
I am trying to set the TTCR1B resister and get a strange result


void setup()
{
    char s[4];
    Serial.begin(9600);
    
    TCCR1B |= (0 << CS12)|(1 << CS11)|(0 << CS10); // Should clear bit 0 and 2 and set bit 1.
    
    Serial.println("=======================");
    snprintf(s, 4, "%d", TCCR1B);
    Serial.println(s);  // (The result I get is a decimal 3 insted of a decimal 2)
    Serial.print("=======================");

}

void loop()
{
    
}

The expected result is a 2 and I get 3
2  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Using an STK500 as a standalone Arduino Board on: January 22, 2011, 11:14:54 am
I found this great blog : http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/

An after burnig the atmega8-noxtal i was able to download the 'blink' example.

Now I can not figure out how to download another program. How do you get the STK500 board to start the bootloader again (and not the blink) program ?
Thanks.
-D
3  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Using an STK500 as a standalone Arduino Board on: January 21, 2011, 11:03:12 pm
Can someone give me the step by step on how to use atmega8 with STK500 ?
I am able to run AVR studio programs (including one that uses the 2nd serial port)
When I burn the bootloader I can not upload a skethch... The LED does blink 3-4 times every 6 seconds but I get an error:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I am trying to do this without a crystal... C code works fine (including serial port)

---Help--

Pages: [1]