# Specific Frequency wave Form Generation

#### KHAN415

Joined Jul 10, 2019
42
The 27Mhz sine wave has been generated using an Xtal Osillator.Now i want to make(Time Period) this as attached in the image. How to set the duty cycle and the frequency ?

#### Attachments

• 92.3 KB Views: 26

#### Alec_t

Joined Sep 17, 2013
10,467
If you aren't too fussy about timing accuracy, arguably the simplest way would be to use a '555 to generate a 1kHz signal with a 10% duty cycle and use that to gate the 27MHz. If higher accuracy is needed then a crystal-controlled 1MHz (for example) oscillator plus frequency divider circuits could generate the mark and space of a 1kHz signal.

#### KHAN415

Joined Jul 10, 2019
42
If you aren't too fussy about timing accuracy, arguably the simplest way would be to use a '555 to generate a 1kHz signal with a 10% duty cycle and use that to gate the 27MHz. If higher accuracy is needed then a crystal-controlled 1MHz (for example) oscillator plus frequency divider circuits could generate the mark and space of a 1kHz signal.
I think you want to say crystall controlled 1 khz frequency and then divide the frequncy usign dividers?Is it possible for 555 timer to adjust 10% duty cycle without affecting the 1 khz frequency?

Joined Mar 10, 2018
3,627
An PWM to control duty cycle of an analog switch along with a counter to do the 1000
frames.

This is one chip, The BurstEnab triggers the counter and PWM to start. PWM outputs
10% duty cycle. Counter counts 1000 PWM cycles then halts burst and disables gate
signal for 27 Mhz.

PSOC 4, board to do this $10, https://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kit Only coding is 2 lines instruction to start PWM and Counter, and any additional code to handle push button trigger cycle for example. If just another logic signal to start, then just the two lines of code. IDE and Compiler free. Timing accuracy << 1%, analog gate (say a pin diode for switch or possibly a Jfet) external. If you want to add adjustable duty cycle just use the onboard SAR and an external pot to control duty cycle. That adds maybe 5-10 lines of code to handle the A/D pot value and translate that to duty cycle value to be written to PWM. Take a look at this. https://forum.allaboutcircuits.com/threads/function-generator-with-burst.158460/#post-1377371 In this case I was generating on chip sine (audio range of freq) and controlling burst. This is kind of thing PSOC makes easy to do. Regards, Dana. Last edited: #### Alec_t Joined Sep 17, 2013 10,467 I think you want to say crystall controlled 1 khz frequency and then divide the frequncy usign dividers? No. I'm not aware you can get 1kHz crystals; hence the suggestion to use a 1MHz (or other convenient frequency for which crystals are readily available) oscillator and divide its frequency down to gve a 1kHz signal. Ultimately, that 1kHz is indirectly crystal-controlled though. Thread Starter #### KHAN415 Joined Jul 10, 2019 42 An PWM to control duty cycle of an analog switch along with a counter to do the 1000 frames. This is one chip, The BurstEnab triggers the counter and PWM to start. PWM outputs 10% duty cycle. Counter counts 1000 PWM cycles then halts burst and disables gate signal for 27 Mhz. PSOC 4, board to do this$ 10,

https://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kit

Only coding is 2 lines instruction to start PWM and Counter, and any
additional code to handle push button trigger cycle for example. If just
another logic signal to start, then just the two lines of code.

View attachment 186110

IDE and Compiler free.

Timing accuracy << 1%, analog gate (say a pin diode for switch or possibly a Jfet) external.

If you want to add adjustable duty cycle just use the onboard SAR and an external
pot to control duty cycle. That adds maybe 5-10 lines of code to handle the A/D pot
value and translate that to duty cycle value to be written to PWM.

Take a look at this.

In this case I was generating on chip sine (audio range of freq) and controlling
burst. This is kind of thing PSOC makes easy to do.

Regards, Dana.
Thanks for your time and help, you guys are really helpful but the soloution seems very expensive for me as i have to purchase this chip from abroad (digikey)etc however i have arduino and stm32 microcontrollers .How about stm32 F4 or any board to for this kind of problem.
Morver i have already generated the sine wave from xtal oscillator and tried 555 timer to do the switching but not get the expected results.

Joined Mar 10, 2018
3,627
As you can see from the PSOC tool all you need is a PWM, a counter (could be software
counter) and A/D if you want adjustable Duty Cycle. All of which the STM32 F4 has.

So code and that part will do the job.

Regards, Dana.

#### KHAN415

Joined Jul 10, 2019
42
As you can see from the PSOC tool all you need is a PWM, a counter (could be software
counter) and A/D if you want adjustable Duty Cycle. All of which the STM32 F4 has.

So code and that part will do the job.

Regards, Dana.
A/d Means analog to digital?

#### KHAN415

Joined Jul 10, 2019
42
The PWM generation of 10% duty cycle is an easy task i guess from stm32 but i am confused about burst,,?i want 1000 pulses per second of the above waveform as shown in the figure

Joined Mar 10, 2018
3,627