How to produce 500 KHZ square wave signals?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

nnnnff
Posts: 87
Joined: Tue Oct 04, 2011 8:55 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

How to produce 500 KHZ square wave signals?

Postby nnnnff » Wed Oct 23, 2013 3:25 pm

Hi,
I use the chip is 16 f877a, crystals is 19.6608 Mhz.
I want to use interrupts produce 500 KHZ square wave signals, but interrupt the maximum frequency of 19200 hz (1:1). How should I do? Help me, thank you

User avatar
STibor
Posts: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 115 times
Been thanked: 112 times
Contact:

Re: How to produce 500 KHZ square wave signals?

Postby STibor » Wed Oct 23, 2013 5:13 pm

Hello

Use a 20MHz crystal.
PWM is used.
9 = the value of the Period register, duty cycle = 4 or 5
These users thanked the author STibor for the post (total 3):
Benj (Wed Oct 23, 2013 5:43 pm) • medelec35 (Wed Oct 23, 2013 6:32 pm) • jgu1 (Wed Oct 23, 2013 7:05 pm)
Rating: 15%
 

jgu1
Posts: 1179
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1104 times
Been thanked: 295 times
Contact:

Re: How to produce 500 KHZ square wave signals?

Postby jgu1 » Wed Oct 23, 2013 7:04 pm

H Stibor!

Waov, what an experience just to be able to come up with this idea :lol: :lol: .

The links you have attached, is this some of your projects?? If, great work :D

I still have loooong way :lol:

Best regard

Jorgen