Rob Jansen wrote:
> this works - I thought that only worked on standard output lines - not on
> special function pins.
> Sometimes I am thinking too complex...

Well, maybe the hostmot2 manpage could use some clarification on this 
issue.  The distinction between "physical I/O pins on the board 
connectors" and "GPIO HAL pins" is currently pretty muddled.

Each physical I/O pin has *some* representation in HAL, but the 
particulars of that representation depends on what the I/O pin is used for.

If the physical I/O pin is used for general-purpose I/O (digital input 
or output), then the manpage calls it a "full" gpio, and the user can do 
anything that the firmware supports.

If the physical I/O pin is used by a PWM, stepgen, or encoder, then the 
manpage calls it a "constrained" gpio, and the HAL representation is 
quite limited: the pin has to still be usable by the higher-level 
function that controls it.  For example, a PWM pin cannot be set to be 
an input.


> Meanwhile I also added spindle control with a PWM output. I think the docs
> are a bit outdated (or I just found the wrong ones).Some docs tell me the to
> use dac.0.value (where PWMs are used to create DACs), another one mentions
> pwmgen (but then use hm5i20 as a board type prefix whereas hostmot2 uses
> hm2_5i20 as boardname. Nothing which cannot be fixed with a bit of logical
> thinking.

It sounds like you found the wrong docs.  Unfortunately, this is 
currently easy to do, because there are two drivers that can be used 
with the Mesa 5i20 board.  The older driver is called m5i20, and it has 
HAL pins with names like "m5i20.0.dac-X-value" pins.  The newer driver 
is called hostmot2 (and hm2_5i20), and it has HAL pins with names like 
"hm2_5i20.0.pwmgen.XX".


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
                   <http://www.withouthotair.com/>

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to