Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[51] how to code a program to generate 10khz squar wave using microcontroller-8051 crystal

Status
Not open for further replies.

Murugappan.pl

Newbie level 2
Joined
Apr 30, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12
how to code a program to generate 10khz squar wave using microcontroller-8051 crystal?as i am beignner help me
 

Assuming you have your compiler and linker already set up to compile/build and upload the code and you don't need much. Once you are in the main function, set up the output pin (i.e. via the direction register) and toggle it after a delay of 100us.

A much better way is to use hardware timers, which allow you to configure a couple registers to generate the square wave without using CPU resources.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top