Witam,
Po wgraniu poprzez avrdude na linuxie mint cinamon 19.1 pliku hex do procka attiny2313, niestety dioda nie miga.
Stworzyłem prosty programik w j. c i poprzez Makefile wgrywam go do procka.
Po komendzie "make program_flash", dioda zapaliła się przez chwilę i zgasła.
Oto program:
//programik avr
//#define F_CPU 8000000UL
#include <avr/io.h>
#include <util/delay.h>
int main(void){
DDRB = 1;
while(1){
PORTB = 1;
_delay_ms(1000);
PORTB = 0;
_delay_ms(1000);
}
return 0;
}
Oto co pokazuje konsola po make:
avr-gcc -DF_CPU=8000000UL -mmcu=attiny2313 -g -Os -Wall -c -o led.o led.c
avr-gcc -DF_CPU=8000000UL -mmcu=attiny2313 -g -Os -Wall led.o -o led.out -lm
avr-objcopy -O ihex -R .eeprom led.out led.hex
To jest po komendzie "make program_flash":
avrdude -c usbasp -P usb -p attiny2313 -U flash:w:led.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e910a (probably t2313)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "led.hex"
avrdude: input file led.hex auto detected as Intel Hex
avrdude: writing flash (102 bytes):
Writing | ################################################## | 100% 0.06s
avrdude: 102 bytes of flash written
avrdude: verifying flash memory against led.hex:
avrdude: load data flash data from input file led.hex:
avrdude: input file led.hex auto detected as Intel Hex
avrdude: input file led.hex contains 102 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.04s
avrdude: verifying ...
avrdude: 102 bytes of flash verified
avrdude: safemode: Fuses OK (E:FF, H:DF, L:FF)
avrdude done. Thank you.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Może mam problemy z uprawnieniami do usb?
Z góry dziękuję za wszelką pomoc i pozdrawiam.