On Fri, 16 Jan 2009, Sebastian Kuzminsky wrote:

> Date: Fri, 16 Jan 2009 08:58:09 -0600
> From: Sebastian Kuzminsky <s...@highlab.com>
> Reply-To: "Enhanced Machine Controller (EMC)"
>     <emc-users@lists.sourceforge.net>
> To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
> Subject: Re: [Emc-users] Mesa 5i23 and 7i37 I/O problem
> 
> Donnie Timmons wrote:
>> I put this in the hal file the only thing different is it now pulses the 
>> output when EMC starts up but I still can not control it. Right now I'm 
>> only looking at the brake output. I'm sure that once I get the brake 
>> working the other will be the same problem.
>>
>> # Connect spindle brake to I/O controller.
>> newsig SpindleBrakeOn bit
>> setp hm2_5i23.0.gpio.P3.042.is_output 1
>> linksp SpindleBrakeOn => hm2_5i23.0.gpio.P3.042.out
>> linksp SpindleBrakeOn <= motion.spindle-brake
>>
>>
>> My Fluke 23 tells me all the inputs are pulled high. Grounding them make no 
>> difference on what the Halmeter is showing but my Fluke sure sees it.


I did verify that at least hardware/firmware wise, The 5I23 configs work fine 
with the 7I37/7I37T on any 5I23 connector.

Sebastian, not related to Donnies problem, but the "pulses the output when EMC 
starts up" statement is a little bothersome. There are some things that need 
to be done in a particular order in the GPIO initialization to avoid possible 
startup glitches on GPIO pins:


1. Set all DDR and OPENDRAIN registers to $000000 first
2. Set all GPIO output registers to $ffffff next 
3. Do any other setup
4. Set DDR and OPENDRAIN registers to their final state as the last step

This will guarantee that the output pins will be high = off until the first
time they are written via HAL

I can set the default GPIO output register value to $ffffff in the firmware 
but its probably better that the driver do this so it always works whether the 
firmware has been reloaded or not.



Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to