├── hardware ├── TinyProbe_BOM_v1.0.tsv ├── TinyProbe_gerber_v1.0.zip └── TinyProbe_schematic_v1.0.pdf ├── documentation ├── TinyProbe_pic1.jpg ├── TinyProbe_pic2.jpg ├── TinyProbe_pic3.jpg ├── TinyProbe_levels.png └── TinyProbe_wiring.png ├── LICENSE ├── software ├── tinyprobe.hex ├── makefile └── TinyProbe.ino └── README.md /hardware/TinyProbe_BOM_v1.0.tsv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/HEAD/hardware/TinyProbe_BOM_v1.0.tsv -------------------------------------------------------------------------------- /documentation/TinyProbe_pic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/HEAD/documentation/TinyProbe_pic1.jpg -------------------------------------------------------------------------------- /documentation/TinyProbe_pic2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/HEAD/documentation/TinyProbe_pic2.jpg -------------------------------------------------------------------------------- /documentation/TinyProbe_pic3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/HEAD/documentation/TinyProbe_pic3.jpg -------------------------------------------------------------------------------- /documentation/TinyProbe_levels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/HEAD/documentation/TinyProbe_levels.png -------------------------------------------------------------------------------- /documentation/TinyProbe_wiring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/HEAD/documentation/TinyProbe_wiring.png -------------------------------------------------------------------------------- /hardware/TinyProbe_gerber_v1.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/HEAD/hardware/TinyProbe_gerber_v1.0.zip -------------------------------------------------------------------------------- /hardware/TinyProbe_schematic_v1.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/HEAD/hardware/TinyProbe_schematic_v1.0.pdf -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. 2 | To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send 3 | a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 4 | -------------------------------------------------------------------------------- /software/tinyprobe.hex: -------------------------------------------------------------------------------- 1 | :1000000009C016C016C014C013C012C011C010C061 2 | :100010000FC00EC011241FBECFE9CDBF20E0A0E667 3 | :10002000B0E001C01D92A136B207E1F711D08DC03A 4 | :10003000E7CF1F920F920FB60F9211248F9382E396 5 | :10004000809360008F910F900FBE0F901F901895B6 6 | :1000500087E087BB18BA83E886B980E28BBF8FB789 7 | :1000600080688FBFA8E0B3E0C2E317B8369A36992C 8 | :10007000FECF84B195B18115934028F463E371E01C 9 | :100080004CEC52E004C064EA70E049E951E0BC9AEB 10 | :10009000C49A84E08A95F1F78AB780628ABFA5BBCB 11 | :1000A0008BE291E00197F1F700C0000015BA96B31A 12 | :1000B000C49824E02A95F1F786B380958923887047 13 | :1000C000BC9894E09A95F1F7B7B9369A3699FECF75 14 | :1000D00024B135B1E1E04217530708F0E0E0F1E068 15 | :1000E0002617370708F0F0E081110BC042175307BD 16 | :1000F00010F4111104C02617370718F4D111C0935A 17 | :10010000600090916000911180E098B3987F98BB57 18 | :10011000882321F0C29A1F2FDE2FA7CF261737077B 19 | :1001200010F4C19A06C04217530718F488B38560CB 20 | :1001300088BB80916000882371F3C298C09A809137 21 | :0E0140006000815080936000E6CFF894FFCFFE 22 | :00000001FF 23 | -------------------------------------------------------------------------------- /software/makefile: -------------------------------------------------------------------------------- 1 | # =================================================================================== 2 | # Project: TinyProbe 3 | # Author: Stefan Wagner 4 | # Year: 2020 5 | # URL: https://github.com/wagiminator 6 | # =================================================================================== 7 | # Type "make help" in the command line. 8 | # =================================================================================== 9 | 10 | # Input and Output File Names 11 | SKETCH = TinyProbe.ino 12 | TARGET = tinyprobe 13 | 14 | # Microcontroller Settings 15 | DEVICE = attiny13a 16 | CLOCK = 1200000 17 | LFUSE = 0x2a 18 | HFUSE = 0xfb 19 | 20 | # Programmer Settings 21 | PROGRMR ?= usbasp 22 | TGTDEV = attiny13 23 | 24 | # Toolchain 25 | CC = avr-gcc 26 | OBJCOPY = avr-objcopy 27 | OBJDUMP = avr-objdump 28 | AVRSIZE = avr-size 29 | AVRDUDE = avrdude -c $(PROGRMR) -p $(TGTDEV) 30 | CLEAN = rm -f *.lst *.obj *.cof *.list *.map *.eep.hex *.o *.s *.d 31 | 32 | # Compiler Flags 33 | CFLAGS = -Wall -Os -flto -mmcu=$(DEVICE) -DF_CPU=$(CLOCK) -x c++ 34 | 35 | # Symbolic Targets 36 | help: 37 | @echo "Use the following commands:" 38 | @echo "make all compile and build $(TARGET).elf/.bin/.hex/.asm for $(DEVICE)" 39 | @echo "make hex compile and build $(TARGET).hex for $(DEVICE)" 40 | @echo "make asm compile and disassemble to $(TARGET).asm for $(DEVICE)" 41 | @echo "make bin compile and build $(TARGET).bin for $(DEVICE)" 42 | @echo "make upload compile and upload to $(DEVICE) using $(PROGRMR)" 43 | @echo "make fuses burn fuses of $(DEVICE) using $(PROGRMR) programmer" 44 | @echo "make install compile, upload and burn fuses for $(DEVICE)" 45 | @echo "make clean remove all build files" 46 | 47 | all: buildelf buildbin buildhex buildasm removetemp size 48 | 49 | elf: buildelf removetemp size 50 | 51 | bin: buildelf buildbin removetemp size removeelf 52 | 53 | hex: buildelf buildhex removetemp size removeelf 54 | 55 | asm: buildelf buildasm removetemp size removeelf 56 | 57 | flash: upload fuses 58 | 59 | install: upload fuses 60 | 61 | upload: hex 62 | @echo "Uploading $(TARGET).hex to $(DEVICE) using $(PROGRMR) ..." 63 | @$(AVRDUDE) -U flash:w:$(TARGET).hex:i 64 | 65 | fuses: 66 | @echo "Burning fuses of $(DEVICE) ..." 67 | @$(AVRDUDE) -U lfuse:w:$(LFUSE):m -U hfuse:w:$(HFUSE):m 68 | 69 | clean: 70 | @echo "Cleaning all up ..." 71 | @$(CLEAN) 72 | @rm -f $(TARGET).elf $(TARGET).bin $(TARGET).hex $(TARGET).asm 73 | 74 | buildelf: 75 | @echo "Compiling $(SKETCH) for $(DEVICE) @ $(CLOCK)Hz ..." 76 | @$(CC) $(CFLAGS) $(SKETCH) -o $(TARGET).elf 77 | 78 | buildbin: 79 | @echo "Building $(TARGET).bin ..." 80 | @$(OBJCOPY) -O binary -R .eeprom $(TARGET).elf $(TARGET).bin 81 | 82 | buildhex: 83 | @echo "Building $(TARGET).hex ..." 84 | @$(OBJCOPY) -j .text -j .data -O ihex $(TARGET).elf $(TARGET).hex 85 | 86 | buildasm: 87 | @echo "Disassembling to $(TARGET).asm ..." 88 | @$(OBJDUMP) -d $(TARGET).elf > $(TARGET).asm 89 | 90 | size: 91 | @echo "------------------" 92 | @echo "FLASH: $(shell $(AVRSIZE) -d $(TARGET).elf | awk '/[0-9]/ {print $$1 + $$2}') bytes" 93 | @echo "SRAM: $(shell $(AVRSIZE) -d $(TARGET).elf | awk '/[0-9]/ {print $$2 + $$3}') bytes" 94 | @echo "------------------" 95 | 96 | removetemp: 97 | @echo "Removing temporary files ..." 98 | @$(CLEAN) 99 | 100 | removeelf: 101 | @echo "Removing $(TARGET).elf ..." 102 | @rm -f $(TARGET).elf 103 | -------------------------------------------------------------------------------- /software/TinyProbe.ino: -------------------------------------------------------------------------------- 1 | // =================================================================================== 2 | // Project: TinyProbe - Simple Logic Probe based on ATtiny13A 3 | // Version: v1.0 4 | // Year: 2020 5 | // Author: Stefan Wagner 6 | // Github: https://github.com/wagiminator 7 | // EasyEDA: https://easyeda.com/wagiminator 8 | // License: http://creativecommons.org/licenses/by-sa/3.0/ 9 | // =================================================================================== 10 | // 11 | // Description: 12 | // ------------ 13 | // TinyProbe is a very simple 5V logic probe for TTL and CMOS logic. The probe 14 | // can detect high (HI), low (LO), floating (FL) and oscillating (OS) signals 15 | // and displays them via four LEDs. 16 | // 17 | // Wiring: 18 | // ------- 19 | // +-\/-+ 20 | // Level Select --- RST ADC0 PB5 1|° |8 Vcc 21 | // Probe ------- ADC3 PB3 2| |7 PB2 ADC1 -------- LED (Charlieplex) 22 | // Pull up/down ------- ADC2 PB4 3| |6 PB1 AIN1 OC0B --- LED (Charlieplex) 23 | // GND 4| |5 PB0 AIN0 OC0A --- LED (Charlieplex) 24 | // +----+ 25 | // 26 | // Compilation Settings: 27 | // --------------------- 28 | // Controller: ATtiny13A 29 | // Core: MicroCore (https://github.com/MCUdude/MicroCore) 30 | // Clockspeed: 1.2 MHz internal 31 | // BOD: BOD 2.7V 32 | // Timing: Micros disabled 33 | // 34 | // Leave the rest on default settings. Don't forget to "Burn bootloader"! 35 | // No Arduino core functions or libraries are used. Use the makefile if 36 | // you want to compile without Arduino IDE. 37 | // 38 | // RESET pin (PB5) is used as a weak analog input for the TTL/CMOS select 39 | // switch. You don't need to disable the RESET pin as the voltage won't go 40 | // below 40% of Vcc. 41 | // 42 | // Fuse settings: -U lfuse:w:0x2a:m -U hfuse:w:0xfb:m 43 | 44 | 45 | // =================================================================================== 46 | // Libraries and Definitions 47 | // =================================================================================== 48 | 49 | // Libraries 50 | #include // for GPIO 51 | #include // for interrupts 52 | #include // for delays 53 | 54 | // Define logic levels for TTL and CMOS at 5V 55 | #define TTL_LOW 164 // ADC value for 0.8V 56 | #define TTL_HIGH 409 // ADC value for 2.0V 57 | #define CMOS_LOW 307 // ADC value for 1.5V 58 | #define CMOS_HIGH 716 // ADC value for 3.5V 59 | #define OSC_DUR 50 // delay time for OS-LED 60 | 61 | // Global variables 62 | volatile uint8_t isOscillating; // oscillation flag 63 | 64 | // =================================================================================== 65 | // Main Function 66 | // =================================================================================== 67 | 68 | int main(void) { 69 | // Local variables 70 | uint16_t valSwitch, valProbe, valHigh, valLow; 71 | uint8_t isHigh, isLow, lastHigh, lastLow; 72 | uint8_t isFloating; 73 | 74 | // Setup GPIO, ADC and interrupts 75 | DDRB = 0b00000111; // set LED pins as output, rest as input 76 | PORTB = 0b00000000; // LEDs off, no pullups on input pins 77 | ADCSRA = 0b10000011; // ADC on, prescaler 8 78 | GIMSK = 0b00100000; // turn on pin change interrupts 79 | SREG |= 0b10000000; // enable global interrupts 80 | 81 | // Loop 82 | while(1) { 83 | // Check logic level selection switch and set high/low thresholds accordingly 84 | valLow = TTL_LOW; // set low value for TTL 85 | valHigh = TTL_HIGH; // set high value for TTL 86 | ADMUX = 0b00000000; // set ADC0 against VCC 87 | ADCSRA |= 0b01000000; // start ADC conversion 88 | while(ADCSRA & 0b01000000); // wait for ADC conversion complete 89 | valSwitch = ADC; // get ADC value 90 | if(valSwitch < 768) { // if switch is on CMOS: 91 | valLow = CMOS_LOW; // set low value for CMOS 92 | valHigh = CMOS_HIGH; // set high value for CMOS 93 | } 94 | 95 | // Check high frequency oscillation using pin change interrupt on probe line 96 | DDRB |= 0b00010000; // set pull pin to output (PB4) 97 | PORTB |= 0b00010000; // pull up probe line (to avoid floating) 98 | _delay_us(10); // wait a bit 99 | GIFR |= 0b00100000; // clear any outstanding pin change interrupt 100 | PCMSK = 0b00001000; // turn on interrupt on probe pin 101 | _delay_ms(1); // wait a millisecond (check >500Hz oscillation) 102 | PCMSK = 0b00000000; // turn off interrupt on probe pin 103 | 104 | // Check if probe is floating by testing the behavior when pulling up/down 105 | isFloating = PINB; // get input values (line is already pulled up) 106 | PORTB &= 0b11101111; // pull down probe line 107 | _delay_us(10); // wait a bit 108 | isFloating &= (~PINB); // get inverse of input values 109 | isFloating &= 0b00001000; // mask the probe line (PB3) 110 | DDRB &= 0b11101111; // set pull pin to input (disable pull) 111 | _delay_us(10); // wait a bit 112 | 113 | // Read voltage on probe line and check if it's logic high or low 114 | ADMUX = 0b00000011; // set ADC3 against VCC 115 | ADCSRA |= 0b01000000; // start ADC conversion 116 | while(ADCSRA & 0b01000000); // wait for ADC conversion complete 117 | valProbe = ADC; // get ADC value 118 | isHigh = (valProbe > valHigh); // check if probe is logic high 119 | isLow = (valProbe < valLow); // check if probe is logic low 120 | 121 | // Check low frequency oscillation 122 | if(!isFloating && ((isHigh && lastLow) || (isLow && lastHigh))) isOscillating = OSC_DUR; 123 | lastHigh = isHigh; lastLow = isLow; 124 | if(isOscillating) isFloating = 0; // avoid misdetection 125 | 126 | // Set the LEDs (charlieplexing) 127 | PORTB &= 0b11111000; // switch off all LEDs 128 | if(isFloating) PORTB |= 0b00000100; // if probe is floating: set FL LED 129 | else { // if not floating: 130 | if(isLow) PORTB |= 0b00000010; // if probe is low: set LO LED 131 | if(isHigh) PORTB |= 0b00000101; // if probe is High: set HI LED 132 | if(isOscillating) { // if probe is oscillating: 133 | PORTB &= 0b11111011; // set OS LED without interfering 134 | PORTB |= 0b00000001; // with HI/LO LED 135 | isOscillating--; // decrease OS LED timer 136 | } 137 | } 138 | } 139 | } 140 | 141 | // Pin change interrupt service routine 142 | ISR(PCINT0_vect) { 143 | isOscillating = OSC_DUR; // oscillating signal on pin change 144 | } 145 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TinyProbe - Logic Probe based on ATtiny13A 2 | 3 | TinyProbe is a very simple 5V logic probe for TTL and CMOS logic based on ATtiny13A. The probe can detect high (HI), low (LO), floating (FL) and oscillating (OS) signals and displays them via four LEDs. 4 | 5 | - Project Video (YouTube): https://youtu.be/mwY1OOxqLTI 6 | - Design Files (EasyEDA): https://easyeda.com/wagiminator/attiny13-tinyprobe 7 | 8 | ![pic1.jpg](https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/master/documentation/TinyProbe_pic1.jpg) 9 | 10 | # Hardware 11 | The basic wiring is shown below: 12 | 13 | ![wiring.png](https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/master/documentation/TinyProbe_wiring.png) 14 | 15 | GND must be connected to ground of the test board, VCC to 5 Volts. In order to keep the device as simple as possible, input protection has been dispensed with. 16 | 17 | # Software 18 | After setting up the GPIO pins, the ADC and the pin change interrupt, the tests are carried out in the main loop. 19 | 20 | ## Checking the TTL / CMOS Selection Switch 21 | First the position of the TTL / CMOS switch is queried. Although this switch is connected to the RESET pin of the ATtiny, it does not trigger a RESET, as the voltage on the pin never drops below 40% VCC due to the voltage divider. Depending on the switch position, the voltage is VCC or VCC / 2. The threshold values for the detection of a HIGH or LOW signal are set accordingly. 22 | 23 | ![levels.png](https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/master/documentation/TinyProbe_levels.png) 24 | 25 | ```c 26 | // define logic levels for TTL and CMOS at 5V 27 | #define TTL_LOW 164 // ADC value for 0.8V 28 | #define TTL_HIGH 409 // ADC value for 2.0V 29 | #define CMOS_LOW 307 // ADC value for 1.5V 30 | #define CMOS_HIGH 716 // ADC value for 3.5V 31 | 32 | // check logic level selection switch and set high/low thresholds accordingly 33 | valLow = TTL_LOW; // set low value for TTL 34 | valHigh = TTL_HIGH; // set high value for TTL 35 | ADMUX = 0b00000000; // set ADC0 against VCC 36 | ADCSRA |= 0b01000000; // start ADC conversion 37 | while(ADCSRA & 0b01000000); // wait for ADC conversion complete 38 | valSwitch = ADC; // get ADC value 39 | if (valSwitch < 768) { // if switch is on CMOS: 40 | valLow = CMOS_LOW; // set low value for CMOS 41 | valHigh = CMOS_HIGH; // set high value for CMOS 42 | } 43 | ``` 44 | 45 | ## Checking for Oscillations 46 | Two methods are used to determine if the signal on the PROBE is oscillating. First of all, the pin change interrupt is activated on the PROBE pin for 1 ms in order to detect high-frequency oscillation. To do this, the 100k resistor is activated as a pull-up (PB4 as output HIGH) so that a possible floating is not accidentally recognized as an oscillation. If there is an oscillation of at least 500Hz, the interrupt is triggered at least once in this millisecond, which sets the isOscillating flag. The isOscillating flag also contains a timer value (OSC_DUR), which is decreased with each loop pass, so that even brief oscillations are visible on the corresponding LED. 47 | 48 | ```c 49 | // check high frequency oscillation using pin change interrupt on probe line 50 | DDRB |= 0b00010000; // set pull pin to output (PB4) 51 | PORTB |= 0b00010000; // pull up probe line (to avoid floating) 52 | _delay_us(10); // wait a bit 53 | GIFR |= 0b00100000; // clear any outstanding pin change interrupt 54 | PCMSK = 0b00001000; // turn on interrupt on probe pin 55 | _delay_ms(1); // wait a millisecond (check >500Hz oscillation) 56 | PCMSK = 0b00000000; // turn off interrupt on probe pin 57 | ``` 58 | 59 | ```c 60 | // pin change interrupt service routine 61 | ISR(PCINT0_vect) { 62 | isOscillating = OSC_DUR; // oscillating signal on pin change 63 | } 64 | ``` 65 | 66 | In order to detect low-frequency oscillation, the isHigh / isLow flags are compared with the previous measurement. A change is evaluated as an oscillation, unless there is floating at the same time. 67 | 68 | ```c 69 | // check low frequency oscillation 70 | if (!isFloating && ((isHigh && lastLow) || (isLow && lastHigh))) isOscillating = OSC_DUR; 71 | lastHigh = isHigh; lastLow = isLow; 72 | ``` 73 | 74 | ## Checking for Floating 75 | In order to recognize whether a FLOATING signal is present, the input is measured once with an activated 100k pullup (PB4 HIGH) and once with an activated 100k pulldown resistor (PB4 LOW). If the two measurements differ, the isFLOATING flag is set. For the subsequent measurement with the ADC, the 100k is deactivated by setting PB4 to INPUT. 76 | 77 | ```c 78 | // check if probe is floating by testing the behavior when pulling up/down 79 | isFloating = PINB; // get input values (line is already pulled up) 80 | PORTB &= 0b11101111; // pull down probe line 81 | _delay_us(10); // wait a bit 82 | isFloating &= (~PINB); // get inverse of input values 83 | isFloating &= 0b00001000; // mask the probe line (PB3) 84 | DDRB &= 0b11101111; // set pull pin to input (disable pull) 85 | _delay_us(10); // wait a bit 86 | ``` 87 | 88 | ## Checking the Logic State 89 | In order to recognize whether there is a HIGH or LOW signal at the PROBE, the applied voltage is measured with the analog to digital converter (ADC) and compared with the threshold values selected based on the switch position. The isLow and isHigh flags are set accordingly. 90 | 91 | ```c 92 | // read voltage on probe line and check if it's logic high or low 93 | ADMUX = 0b00000011; // set ADC3 against VCC 94 | ADCSRA |= 0b01000000; // start ADC conversion 95 | while(ADCSRA & 0b01000000); // wait for ADC conversion complete 96 | valProbe = ADC; // get ADC value 97 | isHigh = (valProbe > valHigh); // check if probe is logic high 98 | isLow = (valProbe < valLow); // check if probe is logic low 99 | ``` 100 | 101 | ## Setting the LEDs 102 | Last but not least, the indication LEDs are set using a simplified Charlieplexing algorithm. If the isOscillating flag is set, the integrated timer is also decremented. 103 | 104 | ```c 105 | // set the LEDs (charlieplexing) 106 | PORTB &= 0b11111000; // switch off all LEDs 107 | if (isFloating) PORTB |= 0b00000100; // if probe is floating: set FL LED 108 | else { // if not floating: 109 | if (isLow) PORTB |= 0b00000010; // if probe is low: set LO LED 110 | if (isHigh) PORTB |= 0b00000101; // if probe is High: set HI LED 111 | if (isOscillating) { // if probe is oscillating: 112 | PORTB &= 0b11111011; // set OS LED without interfering 113 | PORTB |= 0b00000001; // with HI/LO LED 114 | isOscillating--; // decrease OS LED timer 115 | } 116 | } 117 | ``` 118 | 119 | ## Compiling and Uploading 120 | Since there is no ICSP header on the board, you have to program the ATtiny either before soldering using an [SOP adapter](https://aliexpress.com/wholesale?SearchText=sop-8+150mil+adapter), or after soldering using an [EEPROM clip](https://aliexpress.com/wholesale?SearchText=sop8+eeprom+programming+clip). The [AVR Programmer Adapter](https://github.com/wagiminator/AVR-Programmer/tree/master/AVR_Programmer_Adapter) can help with this. 121 | 122 | ### If using the Arduino IDE 123 | - Make sure you have installed [MicroCore](https://github.com/MCUdude/MicroCore). 124 | - Go to **Tools -> Board -> MicroCore** and select **ATtiny13**. 125 | - Go to **Tools** and choose the following board options: 126 | - **Clock:** 1.2 MHz internal osc. 127 | - **BOD:** BOD 2.7V 128 | - **Timing:** Micros disabled 129 | - Connect your programmer to your PC and to the ATtiny. 130 | - Go to **Tools -> Programmer** and select your ISP programmer (e.g. [USBasp](https://aliexpress.com/wholesale?SearchText=usbasp)). 131 | - Go to **Tools -> Burn Bootloader** to burn the fuses. 132 | - Open TinyProbe.ino and click **Upload**. 133 | 134 | ### If using the precompiled hex-file 135 | - Make sure you have installed [avrdude](https://learn.adafruit.com/usbtinyisp/avrdude). 136 | - Connect your programmer to your PC and to the ATtiny. 137 | - Open a terminal. 138 | - Navigate to the folder with the hex-file. 139 | - Execute the following command (if necessary replace "usbasp" with the programmer you use): 140 | ``` 141 | avrdude -c usbasp -p t13 -U lfuse:w:0x2a:m -U hfuse:w:0xfb:m -U flash:w:tinyprobe.hex 142 | ``` 143 | 144 | ### If using the makefile (Linux/Mac) 145 | - Make sure you have installed [avr-gcc toolchain and avrdude](http://maxembedded.com/2015/06/setting-up-avr-gcc-toolchain-on-linux-and-mac-os-x/). 146 | - Connect your programmer to your PC and to the ATtiny. 147 | - Open a terminal. 148 | - Navigate to the folder with the makefile and sketch. 149 | - Run `PROGRMR=usbasp make install` to compile, burn the fuses and upload the firmware (change PROGRMR accordingly). 150 | 151 | # References, Links and Notes 152 | 1. [ATtiny13A Datasheet](http://ww1.microchip.com/downloads/en/DeviceDoc/doc8126.pdf) 153 | 2. [Logic Guide by TI](https://www.ti.com/lit/sg/sdyu001ab/sdyu001ab.pdf) 154 | 155 | ![pic2.jpg](https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/master/documentation/TinyProbe_pic2.jpg) 156 | ![pic3.jpg](https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyProbe/master/documentation/TinyProbe_pic3.jpg) 157 | 158 | # License 159 | ![license.png](https://i.creativecommons.org/l/by-sa/3.0/88x31.png) 160 | 161 | This work is licensed under Creative Commons Attribution-ShareAlike 3.0 Unported License. 162 | (http://creativecommons.org/licenses/by-sa/3.0/) 163 | --------------------------------------------------------------------------------