There are a couple of software I2C libraries, and one hardware library(MSSP) in the conributors section of the forum. In order to use these library's you need to:
1) Copy an include file, being sure it has the XXX.h extension, from the include folder of the GCBasic directory.
2) Go back one level to the GCBasic directory, and then paste that file into the include folder.
3) Rename the copyXXX.h file to the aprropriate I2C header file, say MasterI2C.h in the case of the hardware library.
4) Delete the contents of the new file, and then copy in the header file from the contributors section.
4) Next, use the #include <MasterI2C.h> directive and be sure that the proper initialization of the I2C clock, Port pins, etc. are set for your device and oscillator speed. This may be done on the program or the header file side, as long as it gets done is the important part.
5) Try one of the examples provided.
Personally hope to include a new streamlined hardware I2C library soon. The new library will introduce a SSP module for a Pic slave. Debugging the master write function right now, read is already done.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I had downloaded GCBASIC compiler and found to be very useful for my
PIC based projects.
Where is I2C library located ? How can I use it?
It is not mention any where in documents.
Pls reply.
Regards.
Deepak Chatwani..
There are a couple of software I2C libraries, and one hardware library(MSSP) in the conributors section of the forum. In order to use these library's you need to:
1) Copy an include file, being sure it has the XXX.h extension, from the include folder of the GCBasic directory.
2) Go back one level to the GCBasic directory, and then paste that file into the include folder.
3) Rename the copyXXX.h file to the aprropriate I2C header file, say MasterI2C.h in the case of the hardware library.
4) Delete the contents of the new file, and then copy in the header file from the contributors section.
4) Next, use the #include <MasterI2C.h> directive and be sure that the proper initialization of the I2C clock, Port pins, etc. are set for your device and oscillator speed. This may be done on the program or the header file side, as long as it gets done is the important part.
5) Try one of the examples provided.
Personally hope to include a new streamlined hardware I2C library soon. The new library will introduce a SSP module for a Pic slave. Debugging the master write function right now, read is already done.
Hello,
Thanks for your direction. I will follow your advice.
Regards,
Deepak Chatwani