Nice!
Now forward the info to Devantech![]()
Nice!
Now forward the info to Devantech![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi guys!
Well ! i have some confusions in understanding the following program :
1) what is the purpose and function of this line :
DEBUG " Compass Bearing ", # bearing,13,10
2) Why is the address be written as %11000000?
3) WHat is the function of this line:
i2cread dpin,cpin,%11000000,2,[bearing.Highbyte,bearing.lowbyte]
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
Please help me as soon as possible!
and can anyone tell me whats the cost of this CMPS-03?
Can we operate it through I2C on PIC16F84A?
LETS MOVE TOWARDS SOMETHING PRACTICAL---
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
Many Many Thanks Mr. Vladimir
please tell me the following two points as well!
1) Which type of LCD screen have u used. Can i use an LCD screen with three terminals (+5V, GND, control) using Serout command? What lcd u have used?
2) On each PIC, it is usually written that which is the SDA pin and which is the SLA one. While when i was reading the diagram of PIC16F84A , it was not mentioned. According to you , i can use this I2C on PIC16F84A, is it possible that we can use any two pins for I2C operation? or are there always two fixed pins dedicated for it?
I shall be looking for ur precious reply!
Take carez!
Good Bye!
LETS MOVE TOWARDS SOMETHING PRACTICAL---
Hello shaiqbashir!
I used Hitachi style parallel LCD. As I understood you have serial LCD, it can be connected to PICs without problem , but you need to define , port ,pin, baud rate, and other protocol parameters. You can use SEROUT, SEROUT2 and DEBUG commands. DEBUG command is a bit more complicated as it’s involve DEFINE statements. Please check up PIC Basic PRO manual.
As your second question, frankly speaking I’m not I2C bus expert; I just began to learn it two-three weeks ago. I cannot give you comprehensive answers. It is all I know, some microcontrollers has designated I2C pins, and I used such PIC. I really don’t know how will work PICs without designated pins.
Good luck in your experiments
Vlad
Last edited by vladimir059@hot; - 26th December 2006 at 18:53.
Bookmarks