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.

need a code for 16f877 pic

Status
Not open for further replies.

dnnaziz

Newbie level 3
Joined
Apr 24, 2008
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
i simply need a code that can take input and output for
pic 16f877
 

#include<pic.h> //include PIC header File
#include<stdio.h> //include I/O Header file
#include "delay.c" //include Delay Header file

__CONFIG(0x3f71); //Configuration word

void main()
{
TRISC=0x00; // ass ign PORTC as a output port
PORTC=0x00;

while(1) // Cont.. Loop
{ //Program Starting
PORTC=0xFF;
DelayMs(250);
DelayMs(250);
DelayMs(250);

PORTC=0x00;
DelayMs(250);
DelayMs(250);
DelayMs(250);

}
}
 

Hi!
Atleast give us an idea of the hardware i.e which pins u want to make as inputs and which pins as outputs. What should be the relationship between inputs and outputs.
Regards.
 

thnx yar actually i had done work on 80c51 and now i was trying to use pic
and all i wanted a basic programme u give it an input and u can get an output
and u can use any port u want
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top