PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ATmega_xx8.h 2.7KB

3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* Copyright (c) 2009 by Alex Leone <acleone ~AT~ gmail.com>
  2. This file is part of the Arduino TLC5940 Library.
  3. The Arduino TLC5940 Library is free software: you can redistribute it
  4. and/or modify it under the terms of the GNU General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. The Arduino TLC5940 Library is distributed in the hope that it will be
  8. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with The Arduino TLC5940 Library. If not, see
  13. <http://www.gnu.org/licenses/>. */
  14. #ifndef TLC_ATMEGA_XX8_H
  15. #define TLC_ATMEGA_XX8_H
  16. /** \file
  17. SPI and timer pins for the ATmega168/48/88. Don't edit these. All
  18. changeable pins are defined in tlc_config.h */
  19. /** VPRG (Arduino digital pin 8) -> VPRG (TLC pin 27) */
  20. #define DEFAULT_VPRG_PIN PB0
  21. #define DEFAULT_VPRG_PORT PORTB
  22. #define DEFAULT_VPRG_DDR DDRB
  23. /** XERR (Arduino digital pin 12) -> XERR (TLC pin 16) */
  24. #define DEFAULT_XERR_PIN PB4
  25. #define DEFAULT_XERR_PORT PORTB
  26. #define DEFAULT_XERR_DDR DDRB
  27. #define DEFAULT_XERR_PINS PINB
  28. /** SIN (Arduino digital pin 7) -> SIN (TLC pin 26) */
  29. #define DEFAULT_BB_SIN_PIN PD7
  30. #define DEFAULT_BB_SIN_PORT PORTD
  31. #define DEFAULT_BB_SIN_DDR DDRD
  32. /** SCLK (Arduino digital pin 4) -> SCLK (TLC pin 25) */
  33. #define DEFAULT_BB_SCLK_PIN PD4
  34. #define DEFAULT_BB_SCLK_PORT PORTD
  35. #define DEFAULT_BB_SCLK_DDR DDRD
  36. /** MOSI (Arduino digital pin 11) -> SIN (TLC pin 26) */
  37. #define TLC_MOSI_PIN PB3
  38. #define TLC_MOSI_PORT PORTB
  39. #define TLC_MOSI_DDR DDRB
  40. /** SCK (Arduino digital pin 13) -> SCLK (TLC pin 25) */
  41. #define TLC_SCK_PIN PB5
  42. #define TLC_SCK_PORT PORTB
  43. #define TLC_SCK_DDR DDRB
  44. /** SS will be set to output as to not interfere with SPI master operation.
  45. If you have changed the pin-outs and the library doesn't seem to work
  46. or works intermittently, make sure this pin is set correctly. This pin
  47. will not be used by the library other than setting its direction to
  48. output. */
  49. #define TLC_SS_PIN PB2
  50. #define TLC_SS_DDR DDRB
  51. /** OC1A (Arduino digital pin 9) -> XLAT (TLC pin 24) */
  52. #define XLAT_PIN PB1
  53. #define XLAT_PORT PORTB
  54. #define XLAT_DDR DDRB
  55. /** OC1B (Arduino digital pin 10) -> BLANK (TLC pin 23) */
  56. #define BLANK_PIN PB2
  57. #define BLANK_PORT PORTB
  58. #define BLANK_DDR DDRB
  59. /** OC2B (Arduino digital pin 3) -> GSCLK (TLC pin 18) */
  60. #define GSCLK_PIN PD3
  61. #define GSCLK_PORT PORTD
  62. #define GSCLK_DDR DDRD
  63. #endif