/Modules/Sensors/IRFEE01A/SW/BIN/Tykadlo_30000.hex
0,0 → 1,20
:1000000009C016C015C014C013C012C012C010C061
:100010000FC00EC011241FBECFE9CDBF10E0A0E677
:10002000B0E001C01D92A436B107E1F76FD07CC0EB
:10003000E7CF1F920F920FB60F9211242F933F9389
:100040004F935F938F939F93809163008F5F809313
:100050006300843108F44FC01092630086B350915E
:10006000620090E08071907024E0959587952A95C4
:10007000E1F7252F30E02170307040916100821748
:10008000930711F44F5F01C0415040936100552325
:1000900069F48091610090916000823011F49F5F5B
:1000A00001C09150909360001092610080916000B7
:1000B00089321CF088E28093600080916000883D66
:1000C0001CF488ED80936000809160008F310CF00B
:1000D000C39A87FDC398852F8F5F8093620082301B
:1000E00010F01092620080916200882311F482E186
:1000F00001C082E28FBD9F918F915F914F913F919F
:100100002F910F900FBE0F901F90189581B781BF50
:1001100082E18FBD81E083BF8FE986BF84E089BF24
:0C0120007894B99ABB9AFFCFF894FFCFF7
:00000001FF
/Modules/Sensors/IRFEE01A/SW/BIN/Tykadlo_32000.hex
0,0 → 1,20
:1000000009C016C015C014C013C012C012C010C061
:100010000FC00EC011241FBECFE9CDBF10E0A0E677
:10002000B0E001C01D92A436B107E1F76FD07CC0EB
:10003000E7CF1F920F920FB60F9211242F933F9389
:100040004F935F938F939F93809163008F5F809313
:100050006300843108F44FC01092630086B350915E
:10006000620090E08071907024E0959587952A95C4
:10007000E1F7252F30E02170307040916100821748
:10008000930711F44F5F01C0415040936100552325
:1000900069F48091610090916000823011F49F5F5B
:1000A00001C09150909360001092610080916000B7
:1000B00089321CF088E28093600080916000883D66
:1000C0001CF488ED80936000809160008F310CF00B
:1000D000C39A87FDC398852F8F5F8093620082301B
:1000E00010F01092620080916200882311F482E186
:1000F00001C082E28FBD9F918F915F914F913F919F
:100100002F910F900FBE0F901F90189581B781BF50
:1001100082E18FBD81E083BF85E986BF84E089BF2E
:0C0120007894B99ABB9AFFCFF894FFCFF7
:00000001FF
/Modules/Sensors/IRFEE01A/SW/BIN/Tykadlo_34000.hex
0,0 → 1,20
:1000000009C016C015C014C013C012C012C010C061
:100010000FC00EC011241FBECFE9CDBF10E0A0E677
:10002000B0E001C01D92A436B107E1F76FD07CC0EB
:10003000E7CF1F920F920FB60F9211242F933F9389
:100040004F935F938F939F93809163008F5F809313
:100050006300843108F44FC01092630086B350915E
:10006000620090E08071907024E0959587952A95C4
:10007000E1F7252F30E02170307040916100821748
:10008000930711F44F5F01C0415040936100552325
:1000900069F48091610090916000823011F49F5F5B
:1000A00001C09150909360001092610080916000B7
:1000B00089321CF088E28093600080916000883D66
:1000C0001CF488ED80936000809160008F310CF00B
:1000D000C39A87FDC398852F8F5F8093620082301B
:1000E00010F01092620080916200882311F482E186
:1000F00001C082E28FBD9F918F915F914F913F919F
:100100002F910F900FBE0F901F90189581B781BF50
:1001100082E18FBD81E083BF8CE886BF84E089BF28
:0C0120007894B99ABB9AFFCFF894FFCFF7
:00000001FF
/Modules/Sensors/IRFEE01A/SW/BIN/Tykadlo_36000.hex
0,0 → 1,20
:1000000009C016C015C014C013C012C012C010C061
:100010000FC00EC011241FBECFE9CDBF10E0A0E677
:10002000B0E001C01D92A436B107E1F76FD07CC0EB
:10003000E7CF1F920F920FB60F9211242F933F9389
:100040004F935F938F939F93809163008F5F809313
:100050006300843108F44FC01092630086B350915E
:10006000620090E08071907024E0959587952A95C4
:10007000E1F7252F30E02170307040916100821748
:10008000930711F44F5F01C0415040936100552325
:1000900069F48091610090916000823011F49F5F5B
:1000A00001C09150909360001092610080916000B7
:1000B00089321CF088E28093600080916000883D66
:1000C0001CF488ED80936000809160008F310CF00B
:1000D000C39A87FDC398852F8F5F8093620082301B
:1000E00010F01092620080916200882311F482E186
:1000F00001C082E28FBD9F918F915F914F913F919F
:100100002F910F900FBE0F901F90189581B781BF50
:1001100082E18FBD81E083BF84E886BF84E089BF30
:0C0120007894B99ABB9AFFCFF894FFCFF7
:00000001FF
/Modules/Sensors/IRFEE01A/SW/BIN/Tykadlo_38000.hex
0,0 → 1,20
:1000000009C016C015C014C013C012C012C010C061
:100010000FC00EC011241FBECFE9CDBF10E0A0E677
:10002000B0E001C01D92A436B107E1F76FD07CC0EB
:10003000E7CF1F920F920FB60F9211242F933F9389
:100040004F935F938F939F93809163008F5F809313
:100050006300843108F44FC01092630086B350915E
:10006000620090E08071907024E0959587952A95C4
:10007000E1F7252F30E02170307040916100821748
:10008000930711F44F5F01C0415040936100552325
:1000900069F48091610090916000823011F49F5F5B
:1000A00001C09150909360001092610080916000B7
:1000B00089321CF088E28093600080916000883D66
:1000C0001CF488ED80936000809160008F310CF00B
:1000D000C39A87FDC398852F8F5F8093620082301B
:1000E00010F01092620080916200882311F482E186
:1000F00001C082E28FBD9F918F915F914F913F919F
:100100002F910F900FBE0F901F90189581B781BF50
:1001100082E18FBD81E083BF8DE786BF84E089BF28
:0C0120007894B99ABB9AFFCFF894FFCFF7
:00000001FF
/Modules/Sensors/IRFEE01A/SW/BIN/Tykadlo_40000.hex
0,0 → 1,20
:1000000009C016C015C014C013C012C012C010C061
:100010000FC00EC011241FBECFE9CDBF10E0A0E677
:10002000B0E001C01D92A436B107E1F76FD07CC0EB
:10003000E7CF1F920F920FB60F9211242F933F9389
:100040004F935F938F939F93809163008F5F809313
:100050006300843108F44FC01092630086B350915E
:10006000620090E08071907024E0959587952A95C4
:10007000E1F7252F30E02170307040916100821748
:10008000930711F44F5F01C0415040936100552325
:1000900069F48091610090916000823011F49F5F5B
:1000A00001C09150909360001092610080916000B7
:1000B00089321CF088E28093600080916000883D66
:1000C0001CF488ED80936000809160008F310CF00B
:1000D000C39A87FDC398852F8F5F8093620082301B
:1000E00010F01092620080916200882311F482E186
:1000F00001C082E28FBD9F918F915F914F913F919F
:100100002F910F900FBE0F901F90189581B781BF50
:1001100082E18FBD81E083BF87E786BF84E089BF2E
:0C0120007894B99ABB9AFFCFF894FFCFF7
:00000001FF
/Modules/Sensors/IRFEE01A/SW/BIN/Tykadlo_56000.hex
0,0 → 1,20
:1000000009C016C015C014C013C012C012C010C061
:100010000FC00EC011241FBECFE9CDBF10E0A0E677
:10002000B0E001C01D92A436B107E1F76FD07CC0EB
:10003000E7CF1F920F920FB60F9211242F933F9389
:100040004F935F938F939F93809163008F5F809313
:100050006300843108F44FC01092630086B350915E
:10006000620090E08071907024E0959587952A95C4
:10007000E1F7252F30E02170307040916100821748
:10008000930711F44F5F01C0415040936100552325
:1000900069F48091610090916000823011F49F5F5B
:1000A00001C09150909360001092610080916000B7
:1000B00089321CF088E28093600080916000883D66
:1000C0001CF488ED80936000809160008F310CF00B
:1000D000C39A87FDC398852F8F5F8093620082301B
:1000E00010F01092620080916200882311F482E186
:1000F00001C082E28FBD9F918F915F914F913F919F
:100100002F910F900FBE0F901F90189581B781BF50
:1001100082E18FBD81E083BF84E586BF84E089BF33
:0C0120007894B99ABB9AFFCFF894FFCFF7
:00000001FF
/Modules/Sensors/IRFEE01A/SW/Makefile
0,0 → 1,69
###############################################################################
# Makefile for the project Tykadlo
###############################################################################
# (c)miho www.mlab.cz
 
 
## User Settings
FREQUENCIES = 30000 32000 34000 36000 38000 40000 56000
CALIBRATION = 0
 
## Project
PROJECT = Tykadlo
MCU = attiny13
TARGETDIR = BIN
 
## Variants - all supported frequences
VARIANTS = $(foreach FREQ, $(FREQUENCIES), $(PROJECT)_$(FREQ))
 
## General Flags
CC = avr-gcc
 
## Options common to compile, link and assembly rules
COMMON = -mmcu=$(MCU)
 
## Compile options common for all C compilation units.
CFLAGS = $(COMMON)
CFLAGS += -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
 
## Linker flags
LDFLAGS = $(COMMON)
LDFLAGS += -Wl
 
## Intel Hex file production flags
HEX_FLASH_FLAGS = -R .fuse -R .lock -R .signature
 
## Build
.PHONY: all
all: allhex
 
.PHONY: allhex
allhex: $(foreach VAR, $(VARIANTS), $(VAR).hex)
 
.PHONY: alllss
alllss: $(foreach VAR, $(VARIANTS), $(VAR).lss)
 
%.o: $(PROJECT).c
$(CC) $(INCLUDES) $(CFLAGS) -c $< -D CALIBRATION=$(CALIBRATION) -D IR_FREQUENCY=$(subst $(PROJECT)_,,$(@:.o=))UL -o $@
 
%.elf: %.o
$(CC) $(LDFLAGS) $< $(LIBDIRS) $(LIBS) -o $@
rm $<
 
%.hex: %.elf
avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $(TARGETDIR)/$@
 
%.lss: %.elf
avr-objdump -h -S $< > $(TARGETDIR)/$@
 
## Clean target
.PHONY: clean
clean:
-rm -rf $(PROJECT)*.o $(PROJECT)*.elf dep/* $(TARGETDIR)/$(PROJECT)*.hex $(TARGETDIR)/$(PROJECT)*.lss
-rmdir dep
-rmdir $(TARGETDIR)
 
## Other dependencies
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)
-include $(shell mkdir $(TARGETDIR) 2>/dev/null)
/Modules/Sensors/IRFEE01A/SW/Tykadlo.c
4,6 → 4,7
// (c)miho@mlab.cz
//
// 1.00 - zakladni funkcni verze
// 1.01 - doplnena moznost s externim nastavenim parametru
 
// Prirazeni portu
// ---------------
11,6 → 12,9
// Procesor:
//
// ATtiny13 @ 9.6MHz (interni RC oscilator, vypnuty preddelic 1:8)
// (brown-out reset 2.7V)
// HIGH 0xFB
// LOW 0x7A
//
// Porty:
//
38,10 → 42,18
// hystereze tak, aby vystupni signal byl stabilni a spolehlivy.
//
 
#define F_CPU 9600000UL // 9.6MHz je maximální frekvence pro ATtiny
#ifndef F_CPU
#define F_CPU 9600000UL // 9.6MHz je maximální interní frekvence pro ATtiny
#endif
 
#ifndef IR_FREQUENCY
#define IR_FREQUENCY 36000UL // Frekvece IR signalu
#define CALIBRATION -2 // Zpresneni kalibrace na 9.6MHz 0=nekompenzovat
#endif
 
#ifndef CALIBRATION
#define CALIBRATION 0 // Zpresneni kalibrace na 9.6MHz 0=nekompenzovat
#endif
 
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>