Arduino Due + Digit Shield(nootropic design) library

Hello,

I am using Arduino Due + Digit Shield from nootropic design(Digit Shield) for displaying my output value. But it seems there is some issue with library/header files, because of which the sketch is not compiling. Please help me to debug it.

The error messages are,
Arduino: 1.5.7 (Windows 8), Board: "Arduino Due (Programming Port)"

Build options changed, rebuilding all

C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp: In member function 'void DigitShieldClass::begin()':
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:61:3: error: 'TIMSK2' was not declared in this scope
TIMSK2 &= ~(1 << TOIE2);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:61:20: error: 'TOIE2' was not declared in this scope
TIMSK2 &= ~(1 << TOIE2);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:64:3: error: 'TCCR2A' was not declared in this scope
TCCR2A &= ~((1 << WGM21) | (1 << WGM20));
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:64:21: error: 'WGM21' was not declared in this scope
TCCR2A &= ~((1 << WGM21) | (1 << WGM20));
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:64:36: error: 'WGM20' was not declared in this scope
TCCR2A &= ~((1 << WGM21) | (1 << WGM20));
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:65:3: error: 'TCCR2B' was not declared in this scope
TCCR2B &= ~(1 << WGM22);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:65:20: error: 'WGM22' was not declared in this scope
TCCR2B &= ~(1 << WGM22);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:68:3: error: 'ASSR' was not declared in this scope
ASSR &= ~(1 << AS2);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:68:18: error: 'AS2' was not declared in this scope
ASSR &= ~(1 << AS2);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:71:20: error: 'OCIE2A' was not declared in this scope
TIMSK2 &= ~(1 << OCIE2A);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:74:19: error: 'CS22' was not declared in this scope
TCCR2B |= (1 << CS22);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:75:20: error: 'CS21' was not declared in this scope
TCCR2B &= ~(1 << CS21);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:76:19: error: 'CS20' was not declared in this scope
TCCR2B |= (1 << CS20);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:79:3: error: 'TCNT2' was not declared in this scope
TCNT2 = 0;
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp: In function 'void TIMER2_OVF_vect()':
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:313:3: error: 'TCNT2' was not declared in this scope
TCNT2 = 0;
^

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Hello,

I am using Arduino Due + Digit Shield from nootropic design(Digit Shield) for displaying my output value. But it seems there is some issue with library/header files, because of which the sketch is not compiling. Please help me to debug it.

The error messages are,
Arduino: 1.5.7 (Windows smiley-cool, Board: "Arduino Due (Programming Port)"

Build options changed, rebuilding all

C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp: In member function 'void DigitShieldClass::begin()':
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:61:3: error: 'TIMSK2' was not declared in this scope
TIMSK2 &= ~(1 << TOIE2);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:61:20: error: 'TOIE2' was not declared in this scope
TIMSK2 &= ~(1 << TOIE2);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:64:3: error: 'TCCR2A' was not declared in this scope
TCCR2A &= ~((1 << WGM21) | (1 << WGM20));
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:64:21: error: 'WGM21' was not declared in this scope
TCCR2A &= ~((1 << WGM21) | (1 << WGM20));
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:64:36: error: 'WGM20' was not declared in this scope
TCCR2A &= ~((1 << WGM21) | (1 << WGM20));
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:65:3: error: 'TCCR2B' was not declared in this scope
TCCR2B &= ~(1 << WGM22);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:65:20: error: 'WGM22' was not declared in this scope
TCCR2B &= ~(1 << WGM22);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:68:3: error: 'ASSR' was not declared in this scope
ASSR &= ~(1 << AS2);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:68:18: error: 'AS2' was not declared in this scope
ASSR &= ~(1 << AS2);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:71:20: error: 'OCIE2A' was not declared in this scope
TIMSK2 &= ~(1 << OCIE2A);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:74:19: error: 'CS22' was not declared in this scope
TCCR2B |= (1 << CS22);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:75:20: error: 'CS21' was not declared in this scope
TCCR2B &= ~(1 << CS21);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:76:19: error: 'CS20' was not declared in this scope
TCCR2B |= (1 << CS20);
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:79:3: error: 'TCNT2' was not declared in this scope
TCNT2 = 0;
^
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp: In function 'void TIMER2_OVF_vect()':
C:\Users\chikk_000\Documents\Arduino\libraries\DigitShield\DigitShield.cpp:313:3: error: 'TCNT2' was not declared in this scope
TCNT2 = 0;
^

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

You are going to have to completely rewrite that library to work with the different timers, etc. on the Due.

It looks like the library uses avr registers. You'll have to find out what the code does, and make a due equivalent.

Could you please tell me in short, how could i do that ?

could you please tell me in short, how could i do that ?

Please do not cross-post. This wastes time and resources as people attempt to answer your question on multiple threads.

Threads merged.

  • Moderator

Your third thread deleted. Grrrr.

oops.... I don't know that topics should be discussed in multiple threads. I ll take care of that with my future posts.