CCS code to MikroC PRO

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
Dominic.J
Posts: 37
Joined: 19 Jul 2008 03:37

CCS code to MikroC PRO

#1 Post by Dominic.J » 07 Mar 2010 03:27

Hi,

I have the below code written in CCS complier:
char sync_val[9]={0x55,0x55,0x55,0x55,0x55,0x55,0x72,0x47,0x15};
for(i=0;i<9;i++)
{
for (j=0;j<8;j++)
{
output_bit(DATA_IO,shift_left(&sync_val,1,0));
}
}

Want to convert this code to MikroC pro. Pl., suggest how to convert

Thanks
Dom

p.erasmus
Posts: 3391
Joined: 05 Mar 2009 10:28

Re: CCS code to MikroC PRO

#2 Post by p.erasmus » 07 Mar 2010 10:56

Well I dont see much that must be converted

I suppose this is a CCS Function or the person who wrote the code wrote this
functions ,
output_bit(DATA_IO,shift_left(&sync_val,1,0));


You need to look at this function declaration to know how they work
and then roll them in your code to fit your needs ,
P.Erasmus
Saratov,Russia
--------------------------------------------------------------

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

Re: CCS code to MikroC PRO

#3 Post by Mince-n-Tatties » 07 Mar 2010 12:55

this looks to me like it has been written for serial communications, maybe take a look here http://www.mikroe.com/forum/viewtopic.p ... 1&start=15 it may give you some ideas.

you could also look into the compiler library for software uart.
Best Regards

Mince

Post Reply

Return to “mikroC PRO for PIC General”