⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 register-layout.txt

📁 CNC 的开放码,EMC2 V2.2.8版
💻 TXT
字号:
Generalities============The register layout of the pluto-servo is an implementation detail andmay vary from release to release of emc.The "address" is auto-incrementing after transfers.Multi-byte data is transferred least-significant-byte-first.Read registers==============The "read" registers (data transfer from pluto to PC) are each 4 byteslong and start at address 0.  Beginning a read within a register (e.g.,at address 2) results in undefined behavior.  Bits without aninterpretation are undefined.Address     Bits        Interpretation0..3        0..13       Encoder 0 count            14..27      Encoder 0 last index pulse count	    15		Encoder 0 index seen4..7        0..13       Encoder 1 count            14..27      Encoder 1 last index pulse count	    15		Encoder 0 index seen8..11       0..13       Encoder 2 count            14..27      Encoder 2 last index pulse count	    15		Encoder 0 index seen12..15      0..13       Encoder 3 count            14..27      Encoder 3 last index pulse count	    15		Encoder 0 index seen16..19      0..7        Dedicated digital inputs 0..7            8..11       Encoder 0..3 "Z" input            12..15      Encoder 0..3 "B" input            16..20      Encoder 0..3 "A" input            21..27      (future) watchdog timer valueWrite registers===============The "write" registers (data transfer from pluto to PC) are each 2 byteslong and start at address 0.  Beginning a read within a register (e.g.,at address 1) results in undefined behavior.  Bits without aninterpretation should be sent as 0.Address     Bits        Interpretation0..1        0..10       PWM 0 duty cycle            12          PWM 0 up invert            13          PWM 0 down invert            14          PDM mode indicator for PWM 0..3            15          PWM 0 sign (0=force 'up' low; 1=force 'down' low)2..3        0..10       PWM 1 duty cycle            12          PWM 1 up invert            13          PWM 1 down invert            15          PWM 1 sign (0=force 'up' low; 1=force 'down' low)4..5        0..10       PWM 2 duty cycle            12          PWM 2 up invert            13          PWM 2 down invert            15          PWM 2 sign (0=force 'up' low; 1=force 'down' low)6..7        0..10       PWM 3 duty cycle            12          PWM 3 up invert            13          PWM 3 down invert            15          PWM 3 sign (0=force 'up' low; 1=force 'down' low)8..9        0..9        Dedicated digital outputs 0..9            13          write to 1 to enable encoder test mode            14          write to 1 to enable watchdog and reset WDT            15          Index signal polarity for encoder 0..3Notes=====Encoder=======The encoder "count" and "last index pulse count" must be sign extended in thedriver.  This makes the maximum count rate 8191 counts per polling period.When an index pulse has occurred, "last index pulse count" is updated with thecount on the rising edge of the index, and "index seen" will be set on the nextread cycle.  It is up to the HAL driver to perform index-enable logic.PWM===In up/down mode, bit 15 functions like a sign bit.  In pwm/directionmode, bit 13 functions like a direction bit.  Bits 12 and 13 function asinverts (when PWM function is used) or as digital outputs (when PWMfunction is disabled, bits 10..0 == 0).   It's up to the HAL driver toset all the bits properly for the desired PWM/digital output mode.Watchdog========The watchdog consists of a 7-bit counter and a 1-bit enable which gives awatchdog period of approximately 6.5ms.  At power-up the enable is FALSE.  Whenbit 14 of register 8..9 is written TRUE, the counter is reset to 0 and enableis set to TRUE. (there is no provision for resetting the watchdog enable toFALSE) Every time the PWM counter overflows (approximately 51.2us) the watchdogcounter is incremented if it is not already at its maximum.  When the watchdogcounter is at its maximum, the dedicated digital outputs and PWM outputs aretristated.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -