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.

Programming for square wave generation

Status
Not open for further replies.

YOJANA

Newbie level 1
Joined
Oct 16, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
Hi i need some help related to pic16f877 programming.i need to generate square wave using mplab simulation method.kindly provide me with corresponding code and also how to simulate program step wise using mplab software.also how to see the wave on logic analyser
 

it is reasonably simple. you may use assy language itself.
Depending on use of crystal etc, and with help of datasheet, set the CONFIG. Later you calculate the time period of the half-cycle of the square wave you want to generate. you may set one bit , say port b, 2 for example to output the signal you want. make that bit High
call for the needed delay for half cycle, make it low and call the same delay again. later close the loop back to making the bit high

compile and run it and you get the square wave you needed on PORTB,2
use a 1OK to drive a transistor base in common emitter mode with a 1K collector load. take the signal from the collector with a suitable DC blocking capacitor.
All the best
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top