Main Site Documentation

10MHz clock


#1

Hello,
pls how can i simulate clock for chip, with freq 10 MHz?

static OutputPort m_clock = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.Di49, false);

static void InitExtClock()
{
            m_clock.Write(!m_clock.Read());
            Thread.Sleep(1);
            InitExtClock();
}

Thread.Sleep will stop all operations on board? And how i can set smallest time than 1 ms to sleep?

Thanks…


#2

EMX or G120?

What chip?

You will not be able to get a 10MHZ clock with managed code like you showed. Millisecond timing is the best you can do.

There is the SignalGenerator Class class in the Premium library. It might be useful.

It might be possible to get such a clock with the processor hardware. You would have to read the chip manual and use set the processor registers.


#3

@ Mike - FEZ Panda 2 :slight_smile:


#4

PWM?


#5

@ Gus - I can generate 10 MHz clock by PWM on Panda?


#6

I do not see why not.


#7

@ Gus - Can you post example of using/setting, pls?


#8

http://ghielectronics.com/docs and look for PWM http://ghielectronics.com/docs/18/pwm