-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
392f62e
commit 9e09e9d
Showing
10 changed files
with
1,605 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
:020000040000FA | ||
:02000000D62800 | ||
:08000800A000030E8301A1001A | ||
:100010000A08B6008A010C1C11280C1010100512D9 | ||
:1000200085120B1DCF280B11A81F1A283C08003879 | ||
:10003000031DBC03A71B752835183028B5183028B8 | ||
:10004000B21C7328A20B73281930A20027192C2880 | ||
:100050008716071327157328871207172711732888 | ||
:100060001010FF308F002C083E3EFF3A8E00031820 | ||
:100070008F0310140516271B41283708351C380834 | ||
:10008000AB002B08B00B67283108B0002B082C02FE | ||
:1000900003196928871207132810A8132F080318BB | ||
:1000A0005C282C0703186928AC002B020319692867 | ||
:1000B000031C69282C0872282C0203196928031CC8 | ||
:1000C0006928AC002B0203196928031869282C0839 | ||
:1000D00072282B08AC0035187028071728147228CE | ||
:1000E000871628142714A717CD28B5198928351A7B | ||
:1000F0008928B21CCC28A30BCC281930A300A71A3E | ||
:10010000852887150712A716CC2887110716A7126E | ||
:10011000CC281010FF308F002E083E3EFF3A8E0094 | ||
:1001200003188F0310148516271B9A283908B51D4C | ||
:100130003A08AD002D08B00BC0283108B0002D08DA | ||
:100140002E020319C22887110712A810A8132F081E | ||
:100150000318B5282E070318C228AE002D02031974 | ||
:10016000C228031CC2282E08CB282E020319C2283D | ||
:10017000031CC228AE002D020319C2280318C2288E | ||
:100180002E08CB282D08AE00B519C9280716A814CB | ||
:10019000CB288715A814A714A7136430810036084C | ||
:1001A0008A00210E8300A00E200E0900831603137F | ||
:1001B0001530810010309F008312031717309E0006 | ||
:1001C0009F01F030960183160313860001308700EB | ||
:1001D0000F30850096010830950001308C008D01AC | ||
:1001E000831203138C01850186018701A701A801F1 | ||
:1001F000303090009F01643081001930A20004303B | ||
:10020000F52100380319013EAF000530F521003813 | ||
:100210000319013EB000B1000730F521B2001730DC | ||
:10022000F5217F39A600B5000C30F52100380319FF | ||
:10023000013EB7000D30F52100380319013EB8002A | ||
:100240001430F52100380319013EB9001530F521AD | ||
:1002500000380319013EBA001630F521BB003218F0 | ||
:10026000372983120317F030950083120313851981 | ||
:100270003F29271701309F002222871407110030E1 | ||
:10028000AB009B21AC000030AD00BC21AE00E030E3 | ||
:100290008B0006083218FF3AAA00AA1A532926141E | ||
:1002A000A610A81358292A1A5829A6142610A813EC | ||
:1002B000AA1B5E29A6152612A81363292A1B6329E7 | ||
:1002C0002616A611A8138B138B1B63292608B500CD | ||
:1002D000E7218B179F12271B8429321F7E29281C98 | ||
:1002E0007E29A81C7E29A81B7829A8173B08BC00DA | ||
:1002F0003C080038031D7E2987134929271C4929FA | ||
:10030000A71C49298717492987179B21BC218519D3 | ||
:100310004929071522222B0802220C30351C0D30EA | ||
:10032000082224222D0802221430B51D153008227F | ||
:100330002422071149293518A729B51C0800271BB5 | ||
:10034000A3293808B7291F119F151F12AE29271B93 | ||
:10035000AB293708B7291F119F111F169F149F182B | ||
:10036000AF290530A5000000A50BB3291E080038F1 | ||
:100370000319013EAB000800B519C829351E080055 | ||
:10038000271BC4293A08D8291F119F111F12CF29F2 | ||
:10039000271BCC293908D8291F159F111F129F141C | ||
:1003A0009F18D0290530A5000000A50BD4291E08F0 | ||
:1003B00000380319013EAD0008007D30A4000000A4 | ||
:1003C0000000000000000000A40BDF290800350831 | ||
:1003D000290203190800271F07153508A900022262 | ||
:1003E00017300822271F07110800831203178D00FA | ||
:1003F000831603178C130C14831203170C08831233 | ||
:1004000003130800831203178C00831203130800E0 | ||
:10041000831203178D00831603178C130C158B138F | ||
:100420008B1B0F2A55308D00AA308D008C1483123F | ||
:1004300003130D1E192A831603170C1183120313BD | ||
:100440008B170800851D222A3230B4006E30B300AD | ||
:10045000000000000000000000000000B30B282A8C | ||
:06046000B40B262A003453 | ||
:02400E00D43F9D | ||
:104200004D005A0013000500010003004700400064 | ||
:10421000010003000A000A00000000000100030082 | ||
:10422000010003000A000A00000000006400000012 | ||
:00000001FF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
list p=PIC16F690 | ||
;************************************************************** | ||
;* Pinbelegung | ||
;* ------------------------------------------------------- | ||
;* PORTA 0 In AN0, Endlage2 rechts / grün | ||
;* 1 In AN1, Endlage2 links / rot | ||
;* 2 In AN2, Endlage1 rechts / grün | ||
;* 3 In Taster IBN | ||
;* bei internem Oszillator ohne XCHG_SERVO: | ||
;* 4 Out Impulsausgang für SERVO_2 | ||
;* 5 Out Impulsausgang für SERVO_1 | ||
;* bei internem Oszillator mit XCHG_SERVO: | ||
;* 4 Out Impulsausgang für SERVO_1 | ||
;* 5 Out Impulsausgang für SERVO_2 | ||
;* bei externem Oszillator: | ||
;* 4 Out | ||
;* PORTB 4 In Taster1 rechts | ||
;* 5 In Taster1 links | ||
;* 6 In Taster2 rechts | ||
;* 7 In Taster2 links | ||
;* PORTC 0 In AN4, Endlage1 links / rot | ||
;* bei internem Oszillator: | ||
;* 1 Out IBN ist ein | ||
;* 2 Out Position wird in EEPROM geschrieben | ||
;* bei externer Taktquelle: | ||
;* 1 Out Impulsausgang für SERVO_1 | ||
;* 2 Out Impulsausgang für SERVO_2 | ||
;* 3 Out LED_LI_2 | ||
;* 4 Out LED_RE_2 | ||
;* 5 Out LED_LI_1 | ||
;* 6 Out LED_RE_1 | ||
;* 7 Out POWER_ON | ||
;* | ||
;************************************************************** | ||
; | ||
; Hauptdatei = DSA-2.ASM | ||
; | ||
; M.Zimmermann 22.05.2020 | ||
; | ||
; ServoAnsteuerung : einfache Ansteuerelektronik | ||
; für bis zu zwei Servomotoren | ||
; | ||
; Prozessor PIC 16F690 | ||
; | ||
; Prozessor-Takt 4MHz (wählbar) | ||
; | ||
; zu diesem Project gehören auch die Dateien: | ||
; DSA-2.inc, servo_isr.inc | ||
; | ||
; das HEX-File kann erstellt werden durch: build.bat | ||
; | ||
;************************************************************** | ||
; | ||
; Signalform für Servo: | ||
; | ||
; +--+ +--+ | ||
; | | | | | ||
; | | | | | ||
; -+ +----------+ +- | ||
; |<-- ~20ms -->| | ||
; | | | ||
; ^ | ||
; | | ||
; +-- Breite = 1..2ms (LONG_PULS: 0,5..2,5ms) | ||
; 1(0,5) ms = links | ||
; 1,5 ms = mitte | ||
; 2(2,5) ms = rechts | ||
; | ||
; Pulsabstand 15..30ms möglich | ||
; | ||
; Testservo: Dymond D90eco | ||
; 11.8 * 22.8 * 20.6 mm, Gewicht 9g | ||
; Stellkraft 15NCm | ||
; Stellzeit 0.09sec/45° | ||
; Anschluß: GND | +5V | Imp. | ||
; sw | rt | ws | ||
; | ||
; Programmablauf: | ||
; - Interrupt alle 10ms über Timer abwechselnd für Servo1 und Servo2: | ||
; ~ setze Ausgang auf High | ||
; ~ warte Grundbreite 1ms (LONG_PULS: 0,5ms) | ||
; ~ Wartezeit 0..1ms (LONG_PULS: 0..2ms)je nach Potistellung | ||
; Potistellung 0..5V = 0..1023 ./. 4 = 0..255 | ||
; ~ setze Ausgang auf Low | ||
; | ||
;************************************************************** | ||
; History: | ||
; 1 Portierung von Servoansteuerung Version 4 | ||
; 2 flexible Taktquellenauswahl | ||
; write to eeprom benutzt ISR | ||
; IBN-Routine: Positionsvorgaben aus dem EEPROM | ||
; Servoausgänge getauscht wg. Potizuordnung | ||
; 3 keine Pullups bei invertierten Eingängen an PortB | ||
; 4 neues Timing für ISR | ||
; 5 Servospannungsversorgung nach Erreichen der Position abschaltbar | ||
; | ||
;************************************************************** | ||
; * Copyright (c) 2018 Michael Zimmermann <http://www.kruemelsoft.privat.t-online.de> | ||
; * All rights reserved. | ||
; * | ||
; * LICENSE | ||
; * ------- | ||
; * This program is free software: you can redistribute it and/or modify | ||
; * it under the terms of the GNU General Public License as published by | ||
; * the Free Software Foundation, either version 3 of the License, or | ||
; * (at your option) any later version. | ||
; * | ||
; * This program is distributed in the hope that it will be useful, | ||
; * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
; * GNU General Public License for more details. | ||
; * | ||
; * You should have received a copy of the GNU General Public License | ||
; * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
; * | ||
;************************************************************** | ||
; | ||
; | ||
|
||
#define VERSION_NO .5 | ||
|
||
;......................................................................... | ||
;--- Compiler(Hardware)-Optionen, können 0 oder 1 sein, NICHT änderbar mit ServoAnsteuerung.exe --- | ||
; Taktquelle einstellen - nur EINE von den drei Variablen darf 1 sein! | ||
#define INT_OSC .1 | ||
#define EXT_CST .0 | ||
#define EXT_OSC .0 | ||
|
||
; schreiben ins EEPROM mit ISR | ||
#define WRITE_EEPROM_INT .0 | ||
|
||
; IBN-Routine und EEPROM-Position verwenden | ||
#define USE_IBN .1 | ||
|
||
#define LONG_PULS .1 ; Impulsbreite 0,5...2,5ms | ||
#define XCHG_SERVO .1 ; Anschluss Servo 1 mit Servo 2 tauschen | ||
#define SWITCH_POW_OFF .1 ; Abschalten der Spannungsversorgung nach Positionierung | ||
;......................................................................... | ||
;--- Software-Optionen, können 0 oder 1 sein, änderbar mit ServoAnsteuerung.exe --- | ||
#define INPUT_INV .0 ; Eingänge sind invertiert (aktiv high) | ||
#define LED_BLINK .0 ; LED blinken, wenn ohne Position | ||
#define OVER_L_1 .0 ; for later use | ||
#define OVER_R_1 .0 ; for later use | ||
#define OVER_L_2 .0 ; for later use | ||
#define OVER_R_2 .0 ; for later use | ||
#define SWITCH_OFF .1 ; Abschalten der Spannungsversorgung nach Positionierung | ||
|
||
; sinnvolle Wertepaare: INC_DEC, INC_20 bzw. DEC_DEC, DEC_20 | ||
; Signal 5 1 | ||
; Schranke 1 3 (bzw. 1 2) | ||
#define INC_DEC .1 ; Rampensummand: je größer desto schneller | ||
#define INC_20 .3 ; Summand jede ...te 20ms-Schleife | ||
; je größer desto langsamer | ||
#define DEC_DEC .1 ; Rampensummand: je größer desto schneller | ||
#define DEC_20 .3 ; Summand jede ...te 20ms-Schleife | ||
; je größer desto langsamer | ||
|
||
#include DSA-2.inc | ||
|
||
; end of file |
Oops, something went wrong.