howto-pin11
(C)stachan 08.02.2024
YASP :: How to use pin 11
; Potentiometer (Pin 11)
; Startposition rechts = 0, im Uhrzeigersinn bis 255.
; Starting position right = 0, clockwise to 255.
; Benötigt Word-Register.
; Needs word register.
main:
ADC1 w0 ; Schreibt den Wert des Potentiometers in w0.
; Writes the value of the potentiometer into w0.
DEBUG w0
pause 60000
JMP main
end
Potentiometer Erklärung
Mit dem Potentiometer kann eine Zahl eingegeben werden, indem man es dreht.
Die Zahl ist 0 wenn das Potentiometer nach rechts zeigt (Startposition) und erhöht sich bei Drehung im Uhrzeigersinn bis 255.
Der Wert des Potentiometers kann mit der Instruktion ADC1 ausgelesen werden. Der Wert wird dabei in das Word-Register geschrieben.
Potentiometer explanation
The potentiometer can be used to enter a number by turning it.
The number is 0 when the potentiometer points to the right (start position) and increases to 255 when turned clockwise.
The value of the potentiometer can be read out with the instruction ADC1 . The value is written to the word register.