0% found this document useful (0 votes)
41 views2 pages

Source Code

The document discusses a source code written in C that generates square waves on three output ports (out1, out2, and out3) of a microcontroller. The code initializes the output ports to 0x00, then sets them to 0xaa in a loop. After a delay, it sets out1 and out2 to 0x55 while setting out3 to a different value. The code then repeats this pattern indefinitely to generate square waves on the three output ports.

Uploaded by

udaya57
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views2 pages

Source Code

The document discusses a source code written in C that generates square waves on three output ports (out1, out2, and out3) of a microcontroller. The code initializes the output ports to 0x00, then sets them to 0xaa in a loop. After a delay, it sets out1 and out2 to 0x55 while setting out3 to a different value. The code then repeats this pattern indefinitely to generate square waves on the three output ports.

Uploaded by

udaya57
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SOURCE CODE: #include<regx51.

h> sfr out1=0x90; sfr out2=0xa0; sfr out3=0xb0; unsigned int i; void main() { out1=out2=out3=0x00; while(1) { out1=out2=out3=0xaa; for(i=0;i<25000;i++); out1=out2-out3=0x55; for(i=0;i<25000;i++); } }

RESULT: Thus the source code for square wave generator is written using Keil and implemented in Proteus and verified.

CIRCUIT SCHEMATIC & OUTPUT:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy