Hello GHI,

I use FEZ Panda II boards with Yagarto to control small stepper motors.
(I use Yagarto to generate square wave in the 10,000-100,000 pps range)

My question is, with the newer boards, is Yagarto still the right approach for generating high frequency square waves or can I generate use .NET MF framework ? I assume I still need to use Yagarto on the newer boards, but thought it good to ask.

One last quick question please:
I need to read voltages on analog pins and convert the voltage to a digital value. This works great in the FEZ .Net framework, but I have been having difficulty reading the analog value in Yagarto. Would you have a code sample ? If not, can you confirm I should be able to read an analog pin/voltage in Yagarto ?

Thanks very much for the great products and support!
Larry Scott
Walnut Creek, CA

I am assuming you mean RLP?

To generate signals, you could use the new Signal Generator class found on new products.

Actually Gus, I thought this may have meant native code and no netmf. Larry might need to clarify.

Thanks guys! yes, Gus got it right. I am using .NET MF and RLP. I exit to RLP to toggle the digital pins at a higher frequency. Knowing about the new signal generator class is very helpful! No further info needed!

Wouldn’t PWM be easier?

1 Like

I’m pretty sure some of the PWM pins on the G120 have hardware support for stepper motor drives. I don’t think it’s supported by NETMF specifically but they are generally really easy to configure via the REGISTER command. You’ll have to download the user manual from NXP to check.

Using hardware PWM rather than the Signal Generator class will definately result in better timing accuracy, especially at the rates you want to run at. Also you won’t be loading the CPU.

EDIT - User manual UM10470 page 736 - “The Motor Control PWM (MCPWM) is optimized for three-phase AC and DC motor control
applications, but can be used in many other applications that need timing, counting,
capture, and comparison.” Possibly not so useful for stepper motors.