Benutzer-Werkzeuge

Webseiten-Werkzeuge


pfw:clavis

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
pfw:clavis [2025-06-14 23:49] – [Forth implementation (noForth)] mkapfw:clavis [2025-06-15 08:43] (aktuell) – [Background information] topic of bouncing added mka
Zeile 5: Zeile 5:
 Forth has ''KEY?'' and ''KEY'' to query the computer's keyboard. I therefore call the query of a different individual key something else. Figure below shows such a key. Forth has ''KEY?'' and ''KEY'' to query the computer's keyboard. I therefore call the query of a different individual key something else. Figure below shows such a key.
  
-{{:pfw:weissertaster.jpg?100|The small white button is on the breadboard at the bottom right of the picture.}}+{{:pfw:weissertaster.png?100|The small white button is on the breadboard at the bottom right of the picture.}}
  
  
Zeile 34: Zeile 34:
 In the direction register, P1.7 is set to digital IN. In the direction register, P1.7 is set to digital IN.
 The integrated pull-up resistor is activated to support the high level. The integrated pull-up resistor is activated to support the high level.
-The integrated Schmidt trigger is set to the falling edge.+The integrated Schmitt-Trigger Input is set to the falling edge.
 However, no interrupt should occur, so it is disabled. However, no interrupt should occur, so it is disabled.
 The pin is used in the I/O function. The pin is used in the I/O function.
Zeile 118: Zeile 118:
  
 === What is a Port? === === What is a Port? ===
- 
-See: Texas Instruments MSP430F2xx, MSP430G2xx Family User’s Guide - 8 Digital I/O, p.339ff 
  
 In short: The "port" is formed by 9 registers. The registers are 8 bits wide. Each bit operates on "its" pin. In its basic function, the pin can be used as a digital I/O. The direction register determines whether it is an input or output pin. The interrupt flag register is used here. It can detect a voltage edge and store it as an event bit. The functions of the other registers are described in more detail in the User’s Guide. In short: The "port" is formed by 9 registers. The registers are 8 bits wide. Each bit operates on "its" pin. In its basic function, the pin can be used as a digital I/O. The direction register determines whether it is an input or output pin. The interrupt flag register is used here. It can detect a voltage edge and store it as an event bit. The functions of the other registers are described in more detail in the User’s Guide.
  
- +See: Texas Instruments MSP430F2xx, MSP430G2xx Family User’s Guide - 8 Digital I/O, p.339ff
  
 === How long is a key press? === === How long is a key press? ===
  
 A manual short key press took around 120ms if I tapped the key only once. A manual short key press took around 120ms if I tapped the key only once.
-As you can see in the image, the key //bounces// briefly at the beginning until a stable LOW state is reached. 
-In the second image, the bounce phase has been enlarged. After about 1ms, the bouncing was over. 
  
 {{:pfw:dauer_kurzer_tastendruck_2025-06-14_18-53-38.png?400|Keystroke registered with the logic analyzer}} {{:pfw:dauer_kurzer_tastendruck_2025-06-14_18-53-38.png?400|Keystroke registered with the logic analyzer}}
 +
 +As you can see in the image, the key //bounces// briefly at the beginning until a stable LOW state is reached. 
  
 {{:pfw:prellen-kurzer_tastendruck_zoom_2025-06-14_18-55-44.png?400|Contact bounces after pressing the button}} {{:pfw:prellen-kurzer_tastendruck_zoom_2025-06-14_18-55-44.png?400|Contact bounces after pressing the button}}
  
-The port pin reacts to the first falling edge. Subsequent edgescaused by bouncing, do not trigger anything. The next falling edge would only be registered once the interrupt flag has been reset by the program.+In the second image, the bounce phase has been enlarged. After about 1ms, the bouncing was over.
  
 +The port pin reacts to the first falling edge. Subsequent edges, caused by bouncing, do not trigger anything. The next falling edge would only be registered once the interrupt flag has been reset by the program.
  
 +More on the [[pfw:topicofbouncing|topic of bouncing]].
  
  
pfw/clavis.1749937759.txt.gz · Zuletzt geändert: 2025-06-14 23:49 von mka