AVR fuses

DavPra DavPra@seznam.cz
Čtvrtek Květen 29 13:40:11 CEST 2008


Dobry den,
zacinam zkouset programovat AVR-ka v C-ku. Jdu na to pod linuxem (Xubuntu 8.04). Jako prekladac pouzivam avr-gcc a programator pouzivam avrdude. Zkusil sem si napsat maly programek na blikani LEDky. Jenze sem narazil na problem s fuses. Do datasheetu koukam uz skoro dve hodky a sem z toho stale zmaten. Mohl by mi nekdo prosim poradit jak nastavit fuses.
Program:

#include <avr/io.h>
#include <avr/iotn2313.h>
#include <avr/sleep.h>

#define F_CPU 10.0592E6

#include <util/delay.h>


int main (void)
{

DDRD |=  (1<<PD6);     // nastaven jako vystup
PORTD |= (1<<PORTD6);    // nastavi 1 na vystup
_delay_ms(10000);
PORTD &= ~(0<<PORTD6);  // nastavi 0 na vystup
_delay_ms(10000);

return(0);   
}

Kompilace probehne vpohode, ale nemuzu ten program nahrat do AVRka.
Prikaz pro avrdude pouzivam:

avrdude -p t2313 -c stk200 -U flash:w:$<

boldak@boldak-desktop:~/programovani/avr/projekty/pokus$ sudo make load
[sudo] password for boldak:
avrdude -p t2313 -c stk200 -U flash:w:pokus.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x001e0a
avrdude: Expected signature for ATtiny2313 is 1E 91 0A
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

make: *** [load] Error 1

Pokud dam do prikazu parametr -F tak mi to vyhodi zase tutu hlasku:

boldak@boldak-desktop:~/programovani/avr/projekty/pokus$ sudo make load
avrdude -p t2313 -c stk200 -U -F flash:w:pokus.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e910a
avrdude: safemode: Verify error - unable to read hfuse properly. Programmer may not be reliable.
avrdude: safemode: To protect your AVR the programming will be aborted

avrdude done.  Thank you.

make: *** [load] Error 1

Nevite nekdo jak mam nastavit fuses..?

Predem dekuji za odpoved(i)

Boldak

PS: programator pouzivam STK200 http://hw.cz/Teorie-a-praxe/Konstrukce/ART376-LPT-ISP-Prog.html

 





Další informace o konferenci Hw-list