Problem when applying LTC2400 to Arduino Due

Hello,

I am currently design a pressure sensor system and want to add this LTC2400 ADC into the system to have a better reading.
I have read through the LTC2400 tutorial on line, and tried on Arduino Uno. It works perfectly, now I want to apply it onto Arduino Due.
http://interface.khm.de/index.php/lab/experiments/connect-a-ltc2400-high-precision-24-bit-analog-to-digital-converter/

The code doesn't seem working for Arduino Due, following errors shown. And I am also confused about those SCK, SDO and CS connections with Arduino Due board.Which pins should I connect those into, and how to clarify them in the program. Appreciate any little help.

ADC_Uno_ino.ino: In function 'void setup()':
ADC_Uno_ino:26: error: 'PORTB' was not declared in this scope
ADC_Uno_ino:26: error: '_SFR_BYTE' was not declared in this scope
ADC_Uno_ino:26: error: '_BV' was not declared in this scope
ADC_Uno_ino:27: error: 'DDRB' was not declared in this scope
ADC_Uno_ino:34: error: 'SPCR' was not declared in this scope
ADC_Uno_ino:34: error: 'MSTR' was not declared in this scope
ADC_Uno_ino:35: error: 'SPR0' was not declared in this scope
ADC_Uno_ino:36: error: 'SPR1' was not declared in this scope
ADC_Uno_ino:37: error: 'SPE' was not declared in this scope
ADC_Uno_ino.ino: In function 'void loop()':
ADC_Uno_ino:54: error: 'PORTB' was not declared in this scope
ADC_Uno_ino:54: error: '_SFR_BYTE' was not declared in this scope
ADC_Uno_ino:54: error: '_BV' was not declared in this scope
ADC_Uno_ino:56: error: 'PINB' was not declared in this scope
ADC_Uno_ino:56: error: 'PORTB4' was not declared in this scope
ADC_Uno_ino.ino: In function 'byte SPI_read()':
ADC_Uno_ino:97: error: 'SPDR' was not declared in this scope
ADC_Uno_ino:98: error: 'SPSR' was not declared in this scope
ADC_Uno_ino:98: error: 'SPIF' was not declared in this scope

I don't know anything about the LTC2400, but the errors you get suggest that the code uses 8bit-AVR specific registers.

Basically you need to convert all the 8bit specifics to the corresponding 32bit SAM3X8E registers and stuff. Which is not easy, it requires reading the datasheet alot.

EDIT: Post your "ADC_Uno_ino.ino" code and someone might do it for you.

Yes they are all AVR-specific registers and definitions, that code will not work on a Due.


Rob

Thank you both for reply. I have got my problem solved.
http://forum.arduino.cc/index.php?topic=171825.0
I post this problem on Device as well, here is the link. Anyone interested in following staff may want to take a look at.

Cheers,
Danny