{"action":"closed","issue":{"url":"https://api.github.com/repos/nickgammon/arduino_sketches/issues/15","labels_url":"https://api.github.com/repos/nickgammon/arduino_sketches/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/nickgammon/arduino_sketches/issues/15/comments","events_url":"https://api.github.com/repos/nickgammon/arduino_sketches/issues/15/events","html_url":"https://github.com/nickgammon/arduino_sketches/issues/15","id":65356203,"number":15,"title":"Could you please add 1284P support?","user":{"login":"liudr","id":4213617,"avatar_url":"https://avatars.githubusercontent.com/u/4213617?v=3","gravatar_id":"","url":"https://api.github.com/users/liudr","html_url":"https://github.com/liudr","followers_url":"https://api.github.com/users/liudr/followers","following_url":"https://api.github.com/users/liudr/following{/other_user}","gists_url":"https://api.github.com/users/liudr/gists{/gist_id}","starred_url":"https://api.github.com/users/liudr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liudr/subscriptions","organizations_url":"https://api.github.com/users/liudr/orgs","repos_url":"https://api.github.com/users/liudr/repos","events_url":"https://api.github.com/users/liudr/events{/privacy}","received_events_url":"https://api.github.com/users/liudr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-31T03:31:10Z","updated_at":"2015-04-09T21:16:20Z","closed_at":"2015-04-09T21:16:20Z","body":"Nick,\r\n\r\nThanks for your continued support on this great project! I've added my own 1284P support to your code. Since you already added 1284P support to the fixed file uploader, could you add to this code too?\r\n\r\nThere are two variants:\r\nStandard (manicbug's mighty), and bobuino (CrossRoad's board). I am using pin defs from bobuino since it makes closer mapping to the UNO convention:\r\n\r\n// for fast port access\r\n#if defined (__AVR_ATmega2560__)\r\n  // Atmega2560\r\n  #define BB_MISO_PORT PINH\r\n  #define BB_MOSI_PORT PORTH\r\n  #define BB_SCK_PORT PORTG\r\n  const byte BB_SCK_BIT = 5;\r\n  const byte BB_MISO_BIT = 3;\r\n  const byte BB_MOSI_BIT = 4;\r\n\r\n#elif defined (__AVR_ATmega1284P__)\r\n  // Atmega1284P\r\n  #define BB_MISO_PORT PINB\r\n  #define BB_MOSI_PORT PORTB\r\n  #define BB_SCK_PORT PORTB\r\n  const byte BB_SCK_BIT = 0;\r\n  const byte BB_MISO_BIT = 2;\r\n  const byte BB_MOSI_BIT = 3;\r\n#else\r\n  // Atmega328\r\n  #define BB_MISO_PORT PIND\r\n  #define BB_MOSI_PORT PORTD\r\n  #define BB_SCK_PORT PORTD\r\n  const byte BB_SCK_BIT = 3;\r\n  const byte BB_MISO_BIT = 6;\r\n  const byte BB_MOSI_BIT = 7;\r\n#endif\r\n\r\nI'm not sure how to tell different variants at compile time such as bobuino or standard. Having that in the code would be even better!"}}