Mikroc programming for PIC

Status
Not open for further replies.

sarodiakartik

Newbie level 1
Joined
Apr 24, 2012
Messages
0
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,280
Location
INDIA
Activity points
1,280
i started programming PIC16f877a in mikro c......after some time i got confused about the 'sbit' ,'bit' and '#define'....
as per my knowledge both are used for aliasing...is it right???....if not can you explain me the difference.........is there any difference in size of code between two methods???
please reply soon..........
 

there is a small difference between sbit, bit and # define, sbit bit will take some size whereas # define will not take any size, # define is a preprocessor directive generally used to reduce repetitions and code handling. for example if you have a piece of data or value like 100 which u are using at several places then u can #define it, and you can control that value from a single place.
Let me know if you want anymore intel.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…