Skip to content

Commit 0b75958

Browse files
committed
Added ATtiny88 support
1 parent 1acdcce commit 0b75958

27 files changed

+292
-2349
lines changed

.github/workflows/LibraryBuild.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ jobs:
2929

3030
runs-on: ubuntu-18.04 # I picked Ubuntu to use shell scripts.
3131

32-
env:
33-
# Comma separated list without double quotes around the list.
34-
REQUIRED_LIBRARIES: Keyboard
35-
3632
strategy:
3733
matrix:
3834
# The matrix will produce one job for each configuration parameter of type `arduino-boards-fqbn`
@@ -104,13 +100,22 @@ jobs:
104100

105101
- arduino-boards-fqbn: digistump:avr:digispark-tiny:clock=clock1
106102
platform-url: https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json
107-
sketches-exclude: IR2Keyboard,UnitTest,ControlRelay,ReceiveAndSend,ReceiveDump,SendProntoDemo,MicroGirs,IRDispatcherDemo,SendLGAirConditionerDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM, missing digitalPinToInterrupt
103+
required-libraries: ATtinySerialOut
104+
sketches-exclude: IR2Keyboard,UnitTest,ControlRelay,ReceiveAndSend,ReceiveDump,SendProntoDemo,SendBoseWaveDemo,MicroGirs,IRDispatcherDemo,SendLGAirConditionerDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM, missing digitalPinToInterrupt
105+
build-properties: # the flags were put in compiler.cpp.extra_flags
106+
All: -DEXCLUDE_EXOTIC_PROTOCOLS
107+
108+
- arduino-boards-fqbn: digistump:avr:MHETtiny88 # ATtiny88 China clone board @16 MHz
109+
platform-url: https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json
110+
required-libraries: ATtinySerialOut
111+
sketches-exclude: IR2Keyboard,UnitTest,ControlRelay,ReceiveAndSend,ReceiveDump,SendProntoDemo,SendBoseWaveDemo,MicroGirs,IRDispatcherDemo,SendLGAirConditionerDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM, missing digitalPinToInterrupt
108112
build-properties: # the flags were put in compiler.cpp.extra_flags
109113
All: -DEXCLUDE_EXOTIC_PROTOCOLS
110114

111115
- arduino-boards-fqbn: ATTinyCore:avr:attinyx5:chip=85,clock=1internal
112116
platform-url: http://drazzy.com/package_drazzy.com_index.json
113-
sketches-exclude: IR2Keyboard,UnitTest,ReceiveAndSend,ReceiveDump,SendProntoDemo,MicroGirs,IRDispatcherDemo,SendLGAirConditionerDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM
117+
required-libraries: ATtinySerialOut
118+
sketches-exclude: IR2Keyboard,UnitTest,ReceiveAndSend,ReceiveDump,SendProntoDemo,SendBoseWaveDemo,MicroGirs,IRDispatcherDemo,SendLGAirConditionerDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM
114119
build-properties: # the flags were put in compiler.cpp.extra_flags
115120
All: -DEXCLUDE_EXOTIC_PROTOCOLS
116121

@@ -156,6 +161,6 @@ jobs:
156161
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
157162
arduino-platform: ${{ matrix.arduino-platform }}
158163
platform-url: ${{ matrix.platform-url }}
159-
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
164+
required-libraries: ${{ matrix.required-libraries }}
160165
sketches-exclude: ${{ matrix.sketches-exclude }}
161166
build-properties: ${{ toJson(matrix.build-properties) }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ If you do not know which protocol your IR transmitter uses, you have several cho
8585
- The default software generated PWM has **problems on ATtinies running with 8 MHz**. The PWM frequency is around 30 instead of 38 kHz and RC6 is not reliable. You can switch to timer PWM generation by `#define SEND_PWM_BY_TIMER`.
8686

8787
# Examples
88+
In order to fit the examples to the 8K flash of ATtiny85 and ATtiny88, the [Arduino library ATtinySerialOut](https://github.com/ArminJo/ATtinySerialOut) is required for this CPU's.
89+
8890
### SimpleReceiver + SimpleSender
8991
This examples are a good starting point.
9092

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Removed decode_results results.
1212
- Added unit test and fixed LG send bug.
1313
- MATCH_MARK() etc. now available as matchMark().
14+
- Added ATtiny88 support.
1415

1516
## 3.0.2
1617
- Bug fix for USE_OLD_DECODE.

examples/ControlRelay/PinDefinitionsAndMore.h

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,34 +68,37 @@
6868
#define TONE_PIN PA3
6969
#define IR_TIMING_TEST_PIN PA5
7070

71-
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) || defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__)
72-
# if defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
73-
# if defined(ARDUINO_AVR_DIGISPARK) // tested with 16 and 8 MHz
74-
//#include "ATtinySerialOut.h" // saves 370 bytes program space and 38 bytes RAM
75-
#define LED_BUILTIN PB1
76-
# endif
71+
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
72+
#include "ATtinySerialOut.h" // Available as Arduino library. saves 370 bytes program space and 38 bytes RAM
7773
#define IR_RECEIVE_PIN 0
7874
#define IR_SEND_PIN 4 // Pin 2 is serial output with ATtinySerialOut. Pin 1 is internal LED and Pin3 is USB+ with pullup on Digispark board.
7975
#define TONE_PIN 3
8076
#define IR_TIMING_TEST_PIN 3
8177

82-
# else
83-
// ATtiny87 + ATtiny167 here. For ATtiny167 Pins PB6 and PA3 are usable as interrupt source.
84-
# if defined(ARDUINO_AVR_DIGISPARKPRO)
85-
#define LED_BUILTIN 1 // PB1 - on Digispark board labeled as pin 1 / for ATtinyCore lib use D9
78+
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__)
79+
#include "ATtinySerialOut.h"
80+
// For ATtiny167 Pins PB6 and PA3 are usable as interrupt source.
81+
# if defined(ARDUINO_AVR_DIGISPARKPRO)
8682
#define IR_RECEIVE_PIN 9 // PA3 - on Digispark board labeled as pin 9
8783
//#define IR_RECEIVE_PIN 14 // PB6 / INT0 is connected to USB+ on DigisparkPro boards
8884
#define IR_SEND_PIN 8 // PA2 - on Digispark board labeled as pin 8
8985
#define TONE_PIN 5 // PA7
9086
#define IR_TIMING_TEST_PIN 10 // PA4
9187

92-
# else
88+
# else
9389
#define IR_RECEIVE_PIN 3
9490
#define IR_SEND_PIN 2
9591
#define TONE_PIN 7
96-
# endif
9792
# endif
9893

94+
#elif defined(__AVR_ATtiny88__) // MH-ET Tiny88 board
95+
#include "ATtinySerialOut.h" // Available as Arduino library. Saves 128 bytes program space
96+
// Pin 6 is TX pin 7 is RX
97+
#define IR_RECEIVE_PIN 3 // INT1
98+
#define IR_SEND_PIN 4
99+
#define TONE_PIN 9
100+
#define IR_TIMING_TEST_PIN 8
101+
99102
#elif defined(__AVR_ATtiny3217__)
100103
#define IR_RECEIVE_PIN 10
101104
#define IR_SEND_PIN 11

0 commit comments

Comments
 (0)