On Mon, 22 Sep 2008, Sebastian Kuzminsky wrote: > Date: Mon, 22 Sep 2008 07:26:19 -0600 > From: Sebastian Kuzminsky <[EMAIL PROTECTED]> > Reply-To: "Enhanced Machine Controller (EMC)" > <[email protected]> > To: "Enhanced Machine Controller (EMC)" <[email protected]> > Subject: Re: [Emc-users] stepgen & pwmgen fixes > > Eric H. Johnson wrote: >> I am not sure what you mean by the FPGA register. Do you mean the interface >> register between the driver and the m5i20, or the register actually handling >> the PWM within the FPGA? As I said in an earlier email (off list), I concur >> that the value being sent to the FPGA through the interface register is >> correct (providing the bit shift to bits 16-27 is where the value is >> supposed to go), which would confirm that my pwmgen.scale is set to 1.0. > > By "FPGA register" i mean the register on the 5i20 board where the > driver on the PC tells the 5i20 what PWM duty cycle it wants. I think > this means both of the things you described. > > Ok so we're in agreement that the proper PWM value is being requested of > the 5i20 board, and the question now is whether the FPGA outputs the > proper PWM signal. > > >> I was able to measure the duty cycle on a pain old multi-meter. At values of >> 0.125 and below, the voltage would start dropping from the almost 100% duty >> cycle voltage of just under 3.3V, and very linearly for the range of 0.125 >> down to 0.0. The voltage reading from my meter was in fact very accurate. > > It is my understanding that a normal voltage meter is not a reliable > tool for measuring the pulse width of a PWM signal. > > I'll see if I can borrow an oscilloscope from work... >
My experience is that most DVMs and even analog VOMs tend to read PWM average pretty well when set to read DC volts. This is because DVM DC input circuits usually include a low pass filter that does a good job of averaging the PWM and analog VOMs meter mechanics do the same thing. The symptoms sound like you are running in 9 bit PWM mode (but the driver expecting 12 bit PWM behaviour), that is the PWM width register ends up being 00b instead of the desired 11b. This could be because the driver does not initialize it or manages to overwrite the width field in the mode register after its been set. It could also be a FPGA firmware error, but I checked the HostMot2 firmware fairy thoroughly this February, I can do some low level poking and check this today. (Looking at my coffee cup that says "Don't look at me, Its clearly a software problem") > > -- > Sebastian Kuzminsky > Theo: "Julian? I haven't seen you in twenty years. You look good. > The picture the police have of you doesn't do you justice." > Julian: "What do the police know about justice?" > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > 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 the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
