My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. * Pin mapping for the 644, 644p, 644pa, and 1284p
  24. *
  25. * 644p 31 30 29 28 27 26 25 24 00 01 02 03 04 05 06 07 16 17 18 19 20 21 22 23 08 09 10 11 12 13 14 15
  26. * Port A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
  27. * Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  28. */
  29. #ifndef _FASTIO_644
  30. #define _FASTIO_644
  31. #include "fastio.h"
  32. #define DEBUG_LED DIO0
  33. // UART
  34. #define RXD DIO8
  35. #define TXD DIO9
  36. #define RXD0 DIO8
  37. #define TXD0 DIO9
  38. #define RXD1 DIO10
  39. #define TXD1 DIO11
  40. // SPI
  41. #define SCK DIO7
  42. #define MISO DIO6
  43. #define MOSI DIO5
  44. #define SS DIO4
  45. // TWI (I2C)
  46. #define SCL DIO16
  47. #define SDA DIO17
  48. // Timers and PWM
  49. #define OC0A DIO3
  50. #define OC0B DIO4
  51. #define OC1A DIO13
  52. #define OC1B DIO12
  53. #define OC2A DIO15
  54. #define OC2B DIO14
  55. // Digital I/O
  56. #define DIO0_PIN PINB0
  57. #define DIO0_RPORT PINB
  58. #define DIO0_WPORT PORTB
  59. #define DIO0_DDR DDRB
  60. #define DIO0_PWM NULL
  61. #define DIO1_PIN PINB1
  62. #define DIO1_RPORT PINB
  63. #define DIO1_WPORT PORTB
  64. #define DIO1_DDR DDRB
  65. #define DIO1_PWM NULL
  66. #define DIO2_PIN PINB2
  67. #define DIO2_RPORT PINB
  68. #define DIO2_WPORT PORTB
  69. #define DIO2_DDR DDRB
  70. #define DIO2_PWM NULL
  71. #define DIO3_PIN PINB3
  72. #define DIO3_RPORT PINB
  73. #define DIO3_WPORT PORTB
  74. #define DIO3_DDR DDRB
  75. #define DIO3_PWM OCR0A
  76. #define DIO4_PIN PINB4
  77. #define DIO4_RPORT PINB
  78. #define DIO4_WPORT PORTB
  79. #define DIO4_DDR DDRB
  80. #define DIO4_PWM OCR0B
  81. #define DIO5_PIN PINB5
  82. #define DIO5_RPORT PINB
  83. #define DIO5_WPORT PORTB
  84. #define DIO5_DDR DDRB
  85. #define DIO5_PWM NULL
  86. #define DIO6_PIN PINB6
  87. #define DIO6_RPORT PINB
  88. #define DIO6_WPORT PORTB
  89. #define DIO6_DDR DDRB
  90. #define DIO6_PWM NULL
  91. #define DIO7_PIN PINB7
  92. #define DIO7_RPORT PINB
  93. #define DIO7_WPORT PORTB
  94. #define DIO7_DDR DDRB
  95. #define DIO7_PWM NULL
  96. #define DIO8_PIN PIND0
  97. #define DIO8_RPORT PIND
  98. #define DIO8_WPORT PORTD
  99. #define DIO8_DDR DDRD
  100. #define DIO8_PWM NULL
  101. #define DIO9_PIN PIND1
  102. #define DIO9_RPORT PIND
  103. #define DIO9_WPORT PORTD
  104. #define DIO9_DDR DDRD
  105. #define DIO9_PWM NULL
  106. #define DIO10_PIN PIND2
  107. #define DIO10_RPORT PIND
  108. #define DIO10_WPORT PORTD
  109. #define DIO10_DDR DDRD
  110. #define DIO10_PWM NULL
  111. #define DIO11_PIN PIND3
  112. #define DIO11_RPORT PIND
  113. #define DIO11_WPORT PORTD
  114. #define DIO11_DDR DDRD
  115. #define DIO11_PWM NULL
  116. #define DIO12_PIN PIND4
  117. #define DIO12_RPORT PIND
  118. #define DIO12_WPORT PORTD
  119. #define DIO12_DDR DDRD
  120. #define DIO12_PWM OCR1B
  121. #define DIO13_PIN PIND5
  122. #define DIO13_RPORT PIND
  123. #define DIO13_WPORT PORTD
  124. #define DIO13_DDR DDRD
  125. #define DIO13_PWM OCR1A
  126. #define DIO14_PIN PIND6
  127. #define DIO14_RPORT PIND
  128. #define DIO14_WPORT PORTD
  129. #define DIO14_DDR DDRD
  130. #define DIO14_PWM OCR2B
  131. #define DIO15_PIN PIND7
  132. #define DIO15_RPORT PIND
  133. #define DIO15_WPORT PORTD
  134. #define DIO15_DDR DDRD
  135. #define DIO15_PWM OCR2A
  136. #define DIO16_PIN PINC0
  137. #define DIO16_RPORT PINC
  138. #define DIO16_WPORT PORTC
  139. #define DIO16_DDR DDRC
  140. #define DIO16_PWM NULL
  141. #define DIO17_PIN PINC1
  142. #define DIO17_RPORT PINC
  143. #define DIO17_WPORT PORTC
  144. #define DIO17_DDR DDRC
  145. #define DIO17_PWM NULL
  146. #define DIO18_PIN PINC2
  147. #define DIO18_RPORT PINC
  148. #define DIO18_WPORT PORTC
  149. #define DIO18_DDR DDRC
  150. #define DIO18_PWM NULL
  151. #define DIO19_PIN PINC3
  152. #define DIO19_RPORT PINC
  153. #define DIO19_WPORT PORTC
  154. #define DIO19_DDR DDRC
  155. #define DIO19_PWM NULL
  156. #define DIO20_PIN PINC4
  157. #define DIO20_RPORT PINC
  158. #define DIO20_WPORT PORTC
  159. #define DIO20_DDR DDRC
  160. #define DIO20_PWM NULL
  161. #define DIO21_PIN PINC5
  162. #define DIO21_RPORT PINC
  163. #define DIO21_WPORT PORTC
  164. #define DIO21_DDR DDRC
  165. #define DIO21_PWM NULL
  166. #define DIO22_PIN PINC6
  167. #define DIO22_RPORT PINC
  168. #define DIO22_WPORT PORTC
  169. #define DIO22_DDR DDRC
  170. #define DIO22_PWM NULL
  171. #define DIO23_PIN PINC7
  172. #define DIO23_RPORT PINC
  173. #define DIO23_WPORT PORTC
  174. #define DIO23_DDR DDRC
  175. #define DIO23_PWM NULL
  176. #define DIO24_PIN PINA7
  177. #define DIO24_RPORT PINA
  178. #define DIO24_WPORT PORTA
  179. #define DIO24_DDR DDRA
  180. #define DIO24_PWM NULL
  181. #define DIO25_PIN PINA6
  182. #define DIO25_RPORT PINA
  183. #define DIO25_WPORT PORTA
  184. #define DIO25_DDR DDRA
  185. #define DIO25_PWM NULL
  186. #define DIO26_PIN PINA5
  187. #define DIO26_RPORT PINA
  188. #define DIO26_WPORT PORTA
  189. #define DIO26_DDR DDRA
  190. #define DIO26_PWM NULL
  191. #define DIO27_PIN PINA4
  192. #define DIO27_RPORT PINA
  193. #define DIO27_WPORT PORTA
  194. #define DIO27_DDR DDRA
  195. #define DIO27_PWM NULL
  196. #define DIO28_PIN PINA3
  197. #define DIO28_RPORT PINA
  198. #define DIO28_WPORT PORTA
  199. #define DIO28_DDR DDRA
  200. #define DIO28_PWM NULL
  201. #define DIO29_PIN PINA2
  202. #define DIO29_RPORT PINA
  203. #define DIO29_WPORT PORTA
  204. #define DIO29_DDR DDRA
  205. #define DIO29_PWM NULL
  206. #define DIO30_PIN PINA1
  207. #define DIO30_RPORT PINA
  208. #define DIO30_WPORT PORTA
  209. #define DIO30_DDR DDRA
  210. #define DIO30_PWM NULL
  211. #define DIO31_PIN PINA0
  212. #define DIO31_RPORT PINA
  213. #define DIO31_WPORT PORTA
  214. #define DIO31_DDR DDRA
  215. #define DIO31_PWM NULL
  216. #define AIO0_PIN PINA0
  217. #define AIO0_RPORT PINA
  218. #define AIO0_WPORT PORTA
  219. #define AIO0_DDR DDRA
  220. #define AIO0_PWM NULL
  221. #define AIO1_PIN PINA1
  222. #define AIO1_RPORT PINA
  223. #define AIO1_WPORT PORTA
  224. #define AIO1_DDR DDRA
  225. #define AIO1_PWM NULL
  226. #define AIO2_PIN PINA2
  227. #define AIO2_RPORT PINA
  228. #define AIO2_WPORT PORTA
  229. #define AIO2_DDR DDRA
  230. #define AIO2_PWM NULL
  231. #define AIO3_PIN PINA3
  232. #define AIO3_RPORT PINA
  233. #define AIO3_WPORT PORTA
  234. #define AIO3_DDR DDRA
  235. #define AIO3_PWM NULL
  236. #define AIO4_PIN PINA4
  237. #define AIO4_RPORT PINA
  238. #define AIO4_WPORT PORTA
  239. #define AIO4_DDR DDRA
  240. #define AIO4_PWM NULL
  241. #define AIO5_PIN PINA5
  242. #define AIO5_RPORT PINA
  243. #define AIO5_WPORT PORTA
  244. #define AIO5_DDR DDRA
  245. #define AIO5_PWM NULL
  246. #define AIO6_PIN PINA6
  247. #define AIO6_RPORT PINA
  248. #define AIO6_WPORT PORTA
  249. #define AIO6_DDR DDRA
  250. #define AIO6_PWM NULL
  251. #define AIO7_PIN PINA7
  252. #define AIO7_RPORT PINA
  253. #define AIO7_WPORT PORTA
  254. #define AIO7_DDR DDRA
  255. #define AIO7_PWM NULL
  256. #undef PA0
  257. #define PA0_PIN PINA0
  258. #define PA0_RPORT PINA
  259. #define PA0_WPORT PORTA
  260. #define PA0_DDR DDRA
  261. #define PA0_PWM NULL
  262. #undef PA1
  263. #define PA1_PIN PINA1
  264. #define PA1_RPORT PINA
  265. #define PA1_WPORT PORTA
  266. #define PA1_DDR DDRA
  267. #define PA1_PWM NULL
  268. #undef PA2
  269. #define PA2_PIN PINA2
  270. #define PA2_RPORT PINA
  271. #define PA2_WPORT PORTA
  272. #define PA2_DDR DDRA
  273. #define PA2_PWM NULL
  274. #undef PA3
  275. #define PA3_PIN PINA3
  276. #define PA3_RPORT PINA
  277. #define PA3_WPORT PORTA
  278. #define PA3_DDR DDRA
  279. #define PA3_PWM NULL
  280. #undef PA4
  281. #define PA4_PIN PINA4
  282. #define PA4_RPORT PINA
  283. #define PA4_WPORT PORTA
  284. #define PA4_DDR DDRA
  285. #define PA4_PWM NULL
  286. #undef PA5
  287. #define PA5_PIN PINA5
  288. #define PA5_RPORT PINA
  289. #define PA5_WPORT PORTA
  290. #define PA5_DDR DDRA
  291. #define PA5_PWM NULL
  292. #undef PA6
  293. #define PA6_PIN PINA6
  294. #define PA6_RPORT PINA
  295. #define PA6_WPORT PORTA
  296. #define PA6_DDR DDRA
  297. #define PA6_PWM NULL
  298. #undef PA7
  299. #define PA7_PIN PINA7
  300. #define PA7_RPORT PINA
  301. #define PA7_WPORT PORTA
  302. #define PA7_DDR DDRA
  303. #define PA7_PWM NULL
  304. #undef PB0
  305. #define PB0_PIN PINB0
  306. #define PB0_RPORT PINB
  307. #define PB0_WPORT PORTB
  308. #define PB0_DDR DDRB
  309. #define PB0_PWM NULL
  310. #undef PB1
  311. #define PB1_PIN PINB1
  312. #define PB1_RPORT PINB
  313. #define PB1_WPORT PORTB
  314. #define PB1_DDR DDRB
  315. #define PB1_PWM NULL
  316. #undef PB2
  317. #define PB2_PIN PINB2
  318. #define PB2_RPORT PINB
  319. #define PB2_WPORT PORTB
  320. #define PB2_DDR DDRB
  321. #define PB2_PWM NULL
  322. #undef PB3
  323. #define PB3_PIN PINB3
  324. #define PB3_RPORT PINB
  325. #define PB3_WPORT PORTB
  326. #define PB3_DDR DDRB
  327. #define PB3_PWM OCR0A
  328. #undef PB4
  329. #define PB4_PIN PINB4
  330. #define PB4_RPORT PINB
  331. #define PB4_WPORT PORTB
  332. #define PB4_DDR DDRB
  333. #define PB4_PWM OCR0B
  334. #undef PB5
  335. #define PB5_PIN PINB5
  336. #define PB5_RPORT PINB
  337. #define PB5_WPORT PORTB
  338. #define PB5_DDR DDRB
  339. #define PB5_PWM NULL
  340. #undef PB6
  341. #define PB6_PIN PINB6
  342. #define PB6_RPORT PINB
  343. #define PB6_WPORT PORTB
  344. #define PB6_DDR DDRB
  345. #define PB6_PWM NULL
  346. #undef PB7
  347. #define PB7_PIN PINB7
  348. #define PB7_RPORT PINB
  349. #define PB7_WPORT PORTB
  350. #define PB7_DDR DDRB
  351. #define PB7_PWM NULL
  352. #undef PC0
  353. #define PC0_PIN PINC0
  354. #define PC0_RPORT PINC
  355. #define PC0_WPORT PORTC
  356. #define PC0_DDR DDRC
  357. #define PC0_PWM NULL
  358. #undef PC1
  359. #define PC1_PIN PINC1
  360. #define PC1_RPORT PINC
  361. #define PC1_WPORT PORTC
  362. #define PC1_DDR DDRC
  363. #define PC1_PWM NULL
  364. #undef PC2
  365. #define PC2_PIN PINC2
  366. #define PC2_RPORT PINC
  367. #define PC2_WPORT PORTC
  368. #define PC2_DDR DDRC
  369. #define PC2_PWM NULL
  370. #undef PC3
  371. #define PC3_PIN PINC3
  372. #define PC3_RPORT PINC
  373. #define PC3_WPORT PORTC
  374. #define PC3_DDR DDRC
  375. #define PC3_PWM NULL
  376. #undef PC4
  377. #define PC4_PIN PINC4
  378. #define PC4_RPORT PINC
  379. #define PC4_WPORT PORTC
  380. #define PC4_DDR DDRC
  381. #define PC4_PWM NULL
  382. #undef PC5
  383. #define PC5_PIN PINC5
  384. #define PC5_RPORT PINC
  385. #define PC5_WPORT PORTC
  386. #define PC5_DDR DDRC
  387. #define PC5_PWM NULL
  388. #undef PC6
  389. #define PC6_PIN PINC6
  390. #define PC6_RPORT PINC
  391. #define PC6_WPORT PORTC
  392. #define PC6_DDR DDRC
  393. #define PC6_PWM NULL
  394. #undef PC7
  395. #define PC7_PIN PINC7
  396. #define PC7_RPORT PINC
  397. #define PC7_WPORT PORTC
  398. #define PC7_DDR DDRC
  399. #define PC7_PWM NULL
  400. #undef PD0
  401. #define PD0_PIN PIND0
  402. #define PD0_RPORT PIND
  403. #define PD0_WPORT PORTD
  404. #define PD0_DDR DDRD
  405. #define PD0_PWM NULL
  406. #undef PD1
  407. #define PD1_PIN PIND1
  408. #define PD1_RPORT PIND
  409. #define PD1_WPORT PORTD
  410. #define PD1_DDR DDRD
  411. #define PD1_PWM NULL
  412. #undef PD2
  413. #define PD2_PIN PIND2
  414. #define PD2_RPORT PIND
  415. #define PD2_WPORT PORTD
  416. #define PD2_DDR DDRD
  417. #define PD2_PWM NULL
  418. #undef PD3
  419. #define PD3_PIN PIND3
  420. #define PD3_RPORT PIND
  421. #define PD3_WPORT PORTD
  422. #define PD3_DDR DDRD
  423. #define PD3_PWM NULL
  424. #undef PD4
  425. #define PD4_PIN PIND4
  426. #define PD4_RPORT PIND
  427. #define PD4_WPORT PORTD
  428. #define PD4_DDR DDRD
  429. #define PD4_PWM NULL
  430. #undef PD5
  431. #define PD5_PIN PIND5
  432. #define PD5_RPORT PIND
  433. #define PD5_WPORT PORTD
  434. #define PD5_DDR DDRD
  435. #define PD5_PWM NULL
  436. #undef PD6
  437. #define PD6_PIN PIND6
  438. #define PD6_RPORT PIND
  439. #define PD6_WPORT PORTD
  440. #define PD6_DDR DDRD
  441. #define PD6_PWM OCR2B
  442. #undef PD7
  443. #define PD7_PIN PIND7
  444. #define PD7_RPORT PIND
  445. #define PD7_WPORT PORTD
  446. #define PD7_DDR DDRD
  447. #define PD7_PWM OCR2A
  448. #endif // _FASTIO_644