embadded c or assmbler code for pic16F877A

need of embedded c code

  • need of embedded c code

    Votes: 0 0.0%
  • compiler for that

    Votes: 0 0.0%

  • Total voters
    0
Status
Not open for further replies.

gayathrisankar

New Member
i need embedded c code or assembly code for the pic16F877A.I want to get the output as follows in the output port.... each value with the delay of .833 msec... each set of following values should repeat twice per cycle.

d0 d1 d2 d3 d4 d5 d6 d7 d8 will be as follows for infinity number of times.(continous output)

00100110
00100010

00100111
00101010

00101001
00101000

00011001
00001000

00011010
00001010

i've attached turbo c code here..........

#include<stdio.h>
#include<conio.h>
#include<dos.h>
main()
{
int i;
clrscr();
while(1)
{
for(i=0;i<2;i++)
{
outportb(0x378,38);
delay(0.8333);
outportb(0x378,34);
delay(0.8333);
}
for(i=0;i<2;i++)
{
outportb(0x378,37);
delay(0.8333);
outportb(0x378,32);
delay(0.8333);
}
for(i=0;i<2;i++)
{
outportb(0x378,41);
delay(0.8333);
outportb(0x378,40);
delay(0.8333);
}
for(i=0;i<2;i++)
{
outportb(0x378,25);
delay(0.8333);
outportb(0x378,8);
delay(0.8333);
}
for(i=0;i<2;i++)
{
outportb(0x378,26);
delay(0.8333);
outportb(0x378,10);
delay(0.8333);
}
for(i=0;i<2;i++)
{
outportb(0x378,22);
delay(0.8333);
outportb(0x378,2);
delay(0.8333);
}
}
}
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…