Go Down

Topic: Mighty 1284p SPI / Ethernet how to get it work ? (Read 3 times) previous topic - next topic

sync

Actually, i was referring to D4, D5, D6, D7  :smiley-red:

Anyone here has Ethernet working on Mighty 1284p ?

Nick Gammon

Can you post the exact sketch you are trying? In code tags.

sync

All sketch from the Ethernet examples. Basic stuff.
Arduino 1.0, 1.0.1 on either Windows7 or Mac OS X latest

I'm very confused at this point, i  manage to find solution all by myself most of the time, must be a silly thing hanging there.

Nick Gammon

Looking at w5100.h:

Code: [Select]
private:
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
  inline static void initSS()    { DDRB  |=  _BV(4); };
  inline static void setSS()     { PORTB &= ~_BV(4); };
  inline static void resetSS()   { PORTB |=  _BV(4); };
#elif defined(__AVR_ATmega32U4__)
  inline static void initSS()    { DDRB  |=  _BV(6); };
  inline static void setSS()     { PORTB &= ~_BV(6); };
  inline static void resetSS()   { PORTB |=  _BV(6); };
#elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB162__)
  inline static void initSS()    { DDRB  |=  _BV(0); };
  inline static void setSS()     { PORTB &= ~_BV(0); };
  inline static void resetSS()   { PORTB |=  _BV(0); };
#else
  inline static void initSS()    { DDRB  |=  _BV(2); };
  inline static void setSS()     { PORTB &= ~_BV(2); };
  inline static void resetSS()   { PORTB |=  _BV(2); };
#endif


They don't seem to have a define for the Atmega1284 and the default would appear to be incorrect for you.

CrossRoads

maniacbug's 1284 core files don't cover that?
He's been pretty thorough with those.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up