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 springen
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
this is just a writeup of some tricks I learned from [[User:MariusKintel]]
 +
 
# installing avr gcc
 
# installing avr gcc
 
sudo apt-get install gcc-avr avr-libc
 
sudo apt-get install gcc-avr avr-libc
Zeile 4: Zeile 6:
 
# removing dmx drivers
 
# removing dmx drivers
 
sudo rmmod dmx_usb
 
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
 
# 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
Zeile 19: Zeile 30:
 
#testen
 
#testen
 
screen /dev/ttyUSB0 115200
 
screen /dev/ttyUSB0 115200
 +
 +
quitting: ctr A + K + Y
 +
 +
# 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

Aktuelle Version vom 17. Dezember 2007, 22:10 Uhr

this is just a writeup of some tricks I learned from User:MariusKintel

  1. installing avr gcc

sudo apt-get install gcc-avr avr-libc

  1. removing dmx drivers

sudo rmmod dmx_usb

  1. finding out how big a hex file is on the atmel

avr-size main.hex

  1. programming the bootloader

sudo make -f Makefile.usbasp DEVICE=atmega8 HEXFILE=ATmegaBOOT.hex

  1. flashing arduino

avrdude -F -p atmega8 -P /dev/ttyUSB1 -c stk500 -b 19200 -U flash:w:main.hex

  1. 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
  1. testen

screen /dev/ttyUSB0 115200

quitting: ctr A + K + Y

  1. 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