Wizard23/USB EEG with Arduino HowTo: Unterschied zwischen den Versionen
aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springenZeile 15: | Zeile 15: | ||
# flashing arduino | # flashing arduino | ||
avrdude -F -p atmega8 -P /dev/ttyUSB1 -c stk500 -b 19200 -U flash:w:main.hex | avrdude -F -p atmega8 -P /dev/ttyUSB1 -c stk500 -b 19200 -U flash:w:main.hex | ||
+ | |||
+ | # reading hex back | ||
+ | avrdude -F -p atmega8 -P /dev/ttyUSB0 -c stk500 -b 19200 -U flash:r:back.hex:i | ||
anederungen hardware.h | anederungen hardware.h |
Version vom 30. Juli 2007, 21:22 Uhr
this is just a writeup of some tricks I learned from User:MariusKintel
- installing avr gcc
sudo apt-get install gcc-avr avr-libc
- removing dmx drivers
sudo rmmod dmx_usb
- finding out how big a hex file is on the atmel
avr-size main.hex
- programming the bootloader
sudo make -f Makefile.usbasp DEVICE=atmega8 HEXFILE=ATmegaBOOT.hex
- flashing arduino
avrdude -F -p atmega8 -P /dev/ttyUSB1 -c stk500 -b 19200 -U flash:w:main.hex
- reading hex back
avrdude -F -p atmega8 -P /dev/ttyUSB0 -c stk500 -b 19200 -U flash:r:back.hex:i
anederungen hardware.h
==========
#define DDRB_INIT 0x2C // 0b00101100 #define PORTB_INIT 0x16 // 0b00010110 #define DDRC_INIT 0x00 // 0b00000000 #define PORTC_INIT 0x00 // 0b00000000 #define DDRD_INIT 0x02 // 0b00000010 #define PORTD_INIT 0x2f // 0b00101111
- testen
screen /dev/ttyUSB0 115200
- pinout remember help for marius usb programmarer
USB stecker A T M E L 10pinheader r b e l d u e 10-to-6 stecker r e d 6-to-6 fuer EEG r b e l d a c k