Hello shaiqbashir!

I will try to give you answers.
1) what is the purpose and function of this line :
DEBUG " Compass Bearing ", # bearing,13,10

This is optional line, for development purposes only. It is sends “bearing” value serially to a terminal. In my program this command sends serial string to PORT_C, pin No1, baud rate 2400.

2) Why is the address be written as %11000000?

This is address designated by Devantech (Devantech is company producing the compass module)

3) WHat is the function of this line:

i2cread dpin,cpin,%11000000,2,[bearing.Highbyte,bearing.lowbyte]
Function of this line is reading "bearing" value through I2C bus, as WORD size variable.


4) and what this DEC sign means, i have checked the help section, it is no command. Then why it is written there :

lcdout $fe, 1,"BEARING ",DEC BEARING/10
lcdout $fe, $c0,"Bearing ", dec bearing1

DEC means decimal. This is not command, this is modifier, it is similar to # sign and gives ASCII representation of value sending to LCD.

and can anyone tell me whats the cost of this CMPS-03?

http://www.robotshop.ca/home/product...le-cmps03.html

Can we operate it through I2C on PIC16F84A?

Why not? In my application I use PIC 16F872 because 16F84A has limited amount of ports (pins).
Best regards Vlad