0

I have an Arduino DUE and just got a Micro OLED display from SparkFun.

Using their library, when I try to compile I get the error below. Other example code works just fine and I've programmed this thing a million times with my code. So it's clearly in the SparkFun code.

Here is the SparkFun tutorial page with a description of the product:

https://learn.sparkfun.com/tutorials/micro-oled-breakout-hookup-guide?_ga=1.19136059.2055231411.1404437767

Here is the library I am using:

https://github.com/sparkfun/Micro_OLED_Breakout/tree/master/Firmware/Arduino/libraries/SFE_MicroOLED

Here is the error I get:

Build options changed, rebuilding all
/Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp: In member function 'void MicroOLED::spiSetup()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp:46:10: error: cannot convert 'RwReg* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
 ssport = portOutputRegister(digitalPinToPort(csPin));
 ^
 /Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp:48:51: error: 'portModeRegister' was not declared in this scope
 ssreg = portModeRegister(digitalPinToPort(csPin));
 ^
 /Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp: In member function 'void MicroOLED::i2cSetup()':
 /Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp:84:2: error: 'TWBR' was not declared in this scope
 TWBR = ((F_CPU / I2C_FREQ) - 16) / 2;
 ^
 /Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp: In member function 'void MicroOLED::parallelSetup()':
 /Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp:109:10: error: cannot convert 'RwReg* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
 ssport = portOutputRegister(digitalPinToPort(csPin));
 ^
 /Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp:111:51: error: 'portModeRegister' was not declared in this scope
 ssreg = portModeRegister(digitalPinToPort(csPin));
 ^
 /Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp:114:10: error: cannot convert 'RwReg* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
 wrport = portOutputRegister(digitalPinToPort(wrPin));
 ^
/Applications/Arduino.app/Contents/Resources/Java/libraries/SFE_MicroOLED/hardware.cpp:119:10: error: cannot convert 'RwReg* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
 rdport = portOutputRegister(digitalPinToPort(rdPin));
 ^
 Error compiling.
asked Feb 18, 2015 at 3:13
2
  • That library is uses some AVR specific methods, that aren't implemented for the ARM processor in the Due. Commented Feb 18, 2015 at 12:59
  • Ah, that makes sense. If you want to put this as an answer I will accept. Thanks Commented Feb 18, 2015 at 14:10

1 Answer 1

1

That library is uses some AVR specific methods, that aren't implemented for the ARM processor in the Due.

I don't see a real easy way to port those methods.

answered Feb 19, 2015 at 14:26
1
  • This sucks because the DUE has a ton of RAM, 3.3v native so no converters, and is super fast. Would make an awesome mini-OLED console. :-) And yes, I'm old enough that 96K is a lot of RAM. lol Commented Feb 19, 2015 at 14:56

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.