en:netzer:io

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:netzer:io [2014/07/12 19:03] – [Pulse] Added capture mode sveschen:netzer:io [2025/06/11 20:42] (current) – external edit 127.0.0.1
Line 26: Line 26:
 The ID is used as shortcut on the GPIO websites and in the protocols of [[gpioserver|GPIO server]], [[commands_io|command interface]] and [[serialserver|serial server]]. The ID is used as shortcut on the GPIO websites and in the protocols of [[gpioserver|GPIO server]], [[commands_io|command interface]] and [[serialserver|serial server]].
  
-Every IO-pin has an own configuration page, accessible via the GPIO main page. The signal direction is configured here, but also new functions such as PWM, pulse, edge counter and ADC can be set.+Every IO-pin has an own configuration page, accessible via the GPIO main page. The signal direction is configured here, but also alternate functions such as PWM, pulse, edge counter and ADC can be set.
  
  
Line 85: Line 85:
  
  
-===== Pulse trigger =====+===== Pulse trigger (IO0) =====
  
-Apart from the normal digital function, IO0 can also activate interrupts. On the interrupt, an [[io#edgecounter|edge counter]] is installed. Moreover, an edge may be used at this pin to initiate pulses at **IO3** or **SPI_INT**.+The IO0 channel has installed some more interrupt handling than IO1 and IO2. 
 +Apart from the normal digital function and the [[io#edgecounter|edge counter]] functionality IO0 can handle the following features:
  
-For the activation of the edge, the I00 edge trigger **must** **be activated**. Depending on the setting, the pulse is activated in the event of negative or positive edges. The edge counter, however, must not be necessarily active for pulse activation. For external trigger signals, IO0 must be configured as a digital input. +  * Reload the impulse timer which is used for capture and impulse generation on IO3 and SPI_INT 
 +  * Initiate pulse on IO3 and SPI_INT. 
 + 
 +{{ io0config.gif?direct | }} 
 + 
 +The impulse timer is the core part for generating and measuring impulses on IO3 and SPI_INT.  
 +If the reset check is marked the dedicated impulse timer is reset when the IO0 interrupt occurs.  
 + 
 +For the activation of the interrupt handler, the I00 edge trigger **must** **be activated**.  
 + 
 +Depending on the setting, the pulse is activated in the event of negative or positive edges. The edge counter, however, must not be necessarily active for pulse activation. For external trigger signals, IO0 must be configured as a digital input. 
  
  
Line 103: Line 114:
   * Impulse mode   * Impulse mode
   * Impulse unit   * Impulse unit
 +  * Calibration offset
 </note> </note>
  
Line 116: Line 128:
 The PWM frequency finally directly incluences the length of the two half cycles. The values 40\ kHz, 10\ kHz and 2.5\ kHz are supported. The PWM frequency finally directly incluences the length of the two half cycles. The values 40\ kHz, 10\ kHz and 2.5\ kHz are supported.
  
 +<WRAP center round important 60%>
 +**The PWM mode uses an independent timer (NOT the impulse timer).**
 +It is shared between IO3 and SPI_INT if both are configured for PWM only. 
 +Those the PWM frequency is set for both IO3 and SPI_INT if configured as PWM.
 +</WRAP>
  
 ==== Impulse output ==== ==== Impulse output ====
Line 121: Line 138:
 In impulse mode, individual or also continuous pulse sequencies may be generated.  In impulse mode, individual or also continuous pulse sequencies may be generated. 
  
-The pulse value is 16\ bit in width, but has a **minimum value of 100**, which cannot be fallen below. The value itself is written or read via the GPIO main page or via the [[gpioserver|GPIO server]] or [[commands_io|command interface]]. The pulse length is internally buffered so that the output signal does not accept any inadmissible states in the event of amendments. +The pulse value is 16\ bit in width. The value itself is written or read via the GPIO main page or via the [[gpioserver|GPIO server]] or [[commandinterface|command interface]]. The pulse length is internally buffered so that the output signal does not accept any inadmissible states in the event of amendments. 
  
 The logic refers to the polarity of the pulse. 0-Logic means the pulse is 0, the pin accepts the 1-state. 1-logic means the pulse is 1, the pin accepts 0-state. The logic refers to the polarity of the pulse. 0-Logic means the pulse is 0, the pin accepts the 1-state. 1-logic means the pulse is 1, the pin accepts 0-state.
Line 144: Line 161:
 Analogous to PWM a pulsed current is generated at the pin. It is always triggered whenever an internal counter flows over. The time duration of the counter is (65556*pulse unit). For IO3 and SPI_INT the same internal counter is used, so that both signals are always in phase. Analogous to PWM a pulsed current is generated at the pin. It is always triggered whenever an internal counter flows over. The time duration of the counter is (65556*pulse unit). For IO3 and SPI_INT the same internal counter is used, so that both signals are always in phase.
  
 +
 +Read more on the [[impulse|impulse page]].
  
 ==== Input capture (since version 1.6) ==== ==== Input capture (since version 1.6) ====
  
 It is possible to measure pulses or even periodic signals with input capture mode. It is possible to measure pulses or even periodic signals with input capture mode.
-The capture (second) edge can be set here+The capture (second) edge can be configured as falling or rising one
-The trigger edge depends on the common impulse mode parameter:+The trigger edge depends on the common impulse mode parameter (see below). 
 + 
 +On Netzer startup or after configuring for capture mode the measured value is set to 0. 
 +The measured value can also be written to any value at runtime.  
 +For instance the value can be set to 0 after reading out to distinguish old from new values. 
 + 
 +The measured value must be multiplied with the set time unit to get the final measured time. 
 + 
 +The measured value is 0xFFFF if the timer has overflown before the capture edge has occured.
  
  
Line 177: Line 204:
 If trigger edge is falling and capture edge is rising the low impulse width of a signal can be measured. If trigger edge is falling and capture edge is rising the low impulse width of a signal can be measured.
 If trigger edge is rising and capture edge is falling the highimpulse width of a signal can be measured. If trigger edge is rising and capture edge is falling the highimpulse width of a signal can be measured.
 +
 +Read more on the [[impulse|impulse page]].
 +
  
 ===== ADC ===== ===== ADC =====