Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Atmega8? #26

Open
kokospalme opened this issue Oct 31, 2022 · 0 comments
Open

Support for Atmega8? #26

kokospalme opened this issue Oct 31, 2022 · 0 comments

Comments

@kokospalme
Copy link

kokospalme commented Oct 31, 2022

Hello,
I'm working on a small arduino synth-project which contains a diy pcb with an atmega8 and a 16Mhz crystal on it.
When I try to compile the my code, which works fine on an Arduino Uno gives me the following error:
(It's actually a fork on this library: https://github.com/ChrisMicro/the_synth)

Arduino:` 1.8.19 (Mac OS X), Board: "ATmega8, No bootloader, EEPROM retained, BOD 2.7V, LTO enabled, External 16 MHz"

In file included from /Users/xx/Documents/Arduino/P13_TinySynthKeys_Wavetable_ardu/P13_TinySynthKeys_Wavetable_ardu.ino:2:0:
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h: In function 'void __vector_6()':
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:72:2: error: 'OCR2A' was not declared in this scope
  OCR2A = OCR2B = Output;
  ^~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:72:2: note: suggested alternative: 'OCR2'
  OCR2A = OCR2B = Output;
  ^~~~~
  OCR2
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:72:10: error: 'OCR2B' was not declared in this scope
  OCR2A = OCR2B = Output;
          ^~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:72:10: note: suggested alternative: 'OCR2'
  OCR2A = OCR2B = Output;
          ^~~~~
          OCR2
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h: In member function 'void synth::begin()':
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:157:2: error: 'TCCR1C' was not declared in this scope
  TCCR1C = 0x00;
  ^~~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:157:2: note: suggested alternative: 'TCCR1A'
  TCCR1C = 0x00;
  ^~~~~~
  TCCR1A
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:159:6: error: 'TIMSK1' was not declared in this scope
  SET(TIMSK1, OCIE1A);                            //-Start audio interrupt
      ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:35:19: note: in definition of macro 'SET'
 #define SET(x,y) (x |=(1<<y))            //-Bit set/clear macros
                   ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:159:6: note: suggested alternative: 'TIMSK'
  SET(TIMSK1, OCIE1A);                            //-Start audio interrupt
      ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:35:19: note: in definition of macro 'SET'
 #define SET(x,y) (x |=(1<<y))            //-Bit set/clear macros
                   ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:162:2: error: 'TCCR2A' was not declared in this scope
  TCCR2A = 0x83;                                  //-8 bit audio PWM
  ^~~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:162:2: note: suggested alternative: 'TCCR1A'
  TCCR2A = 0x83;                                  //-8 bit audio PWM
  ^~~~~~
  TCCR1A
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:163:2: error: 'TCCR2B' was not declared in this scope
  TCCR2B = 0x01;                                  // |
  ^~~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:163:2: note: suggested alternative: 'TCCR1B'
  TCCR2B = 0x01;                                  // |
  ^~~~~~
  TCCR1B
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:164:2: error: 'OCR2A' was not declared in this scope
  OCR2A = 127;                                    //-+
  ^~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:164:2: note: suggested alternative: 'OCR2'
  OCR2A = 127;                                    //-+
  ^~~~~
  OCR2
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h: In member function 'void synth::begin(unsigned char)':
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:183:2: error: 'TCCR1C' was not declared in this scope
  TCCR1C = 0x00;
  ^~~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:183:2: note: suggested alternative: 'TCCR1A'
  TCCR1C = 0x00;
  ^~~~~~
  TCCR1A
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:185:6: error: 'TIMSK1' was not declared in this scope
  SET(TIMSK1, OCIE1A);                            //-Start audio interrupt
      ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:35:19: note: in definition of macro 'SET'
 #define SET(x,y) (x |=(1<<y))            //-Bit set/clear macros
                   ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:185:6: note: suggested alternative: 'TIMSK'
  SET(TIMSK1, OCIE1A);                            //-Start audio interrupt
      ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:35:19: note: in definition of macro 'SET'
 #define SET(x,y) (x |=(1<<y))            //-Bit set/clear macros
                   ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:193:3: error: 'TCCR2A' was not declared in this scope
   TCCR2A = 0xB3;                                  //-8 bit audio PWM
   ^~~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:193:3: note: suggested alternative: 'TCCR1A'
   TCCR2A = 0xB3;                                  //-8 bit audio PWM
   ^~~~~~
   TCCR1A
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:194:3: error: 'TCCR2B' was not declared in this scope
   TCCR2B = 0x01;                                  // |
   ^~~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:194:3: note: suggested alternative: 'TCCR1B'
   TCCR2B = 0x01;                                  // |
   ^~~~~~
   TCCR1B
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:195:3: error: 'OCR2A' was not declared in this scope
   OCR2A = OCR2B = 127;                            //-+
   ^~~~~
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:195:3: note: suggested alternative: 'OCR2'
   OCR2A = OCR2B = 127;                            //-+
   ^~~~~
   OCR2
/Users/Chris/Documents/Arduino/libraries/the_synth/src/synth.h:195:11: error: 'OCR2B' was not declared in this scope
   OCR2A = OCR2B = 127;                            //-+
           ^~~~~
/Users/Chris/Documents/Arduino/libraries/the_synth/src/synth.h:195:11: note: suggested alternative: 'OCR2'
   OCR2A = OCR2B = 127;                            //-+
           ^~~~~
           OCR2
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h: In member function 'void synth::suspend()':
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:394:10: error: 'TIMSK1' was not declared in this scope
      CLR(TIMSK1, OCIE1A);                            //-Stop audio interrupt
          ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:36:19: note: in definition of macro 'CLR'
 #define CLR(x,y) (x &= (~(1<<y)))          // |
                   ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:394:10: note: suggested alternative: 'TIMSK'
      CLR(TIMSK1, OCIE1A);                            //-Stop audio interrupt
          ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:36:19: note: in definition of macro 'CLR'
 #define CLR(x,y) (x &= (~(1<<y)))          // |
                   ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h: In member function 'void synth::resume()':
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:398:10: error: 'TIMSK1' was not declared in this scope
      SET(TIMSK1, OCIE1A);                            //-Start audio interrupt
          ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:35:19: note: in definition of macro 'SET'
 #define SET(x,y) (x |=(1<<y))            //-Bit set/clear macros
                   ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:398:10: note: suggested alternative: 'TIMSK'
      SET(TIMSK1, OCIE1A);                            //-Start audio interrupt
          ^
/Users/xx/Documents/Arduino/libraries/the_synth/src/synth.h:35:19: note: in definition of macro 'SET'
 #define SET(x,y) (x |=(1<<y))            //-Bit set/clear macros
                   ^
exit status 1
Fehler beim Kompilieren für das Board ATmega8.

I think the registers of the Atmega328 and Atmega8 are different... What do I have to know about the processor to get this library working on an Atmega8? The Library is really great it would be a charm if I could get it working on my project...

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant