-1
unsigned char EEByteWrite( PARAM_SCLASS unsigned char control,
                           PARAM_SCLASS unsigned char address,
                           PARAM_SCLASS unsigned char data );
unsigned int  EERandomRead( PARAM_SCLASS unsigned char control, PARAM_SCLASS unsigned char address );

I can find the prototypes of EEByteWrite and EERandomRead functions in library file i2c.h but I can't find the whole functions where their whole working has been defined. I want to change the data type of one argument (unsigned char address-unsigned int address) but only changing the type in the prototype isn't working so I want to change the function accordingly. Anybody knows where theses functions are. If not plz help me to put value more than 255 in unsigned char address so I can complete my project.

I am using PIC 18F4520 , I2C interfacing with AT24c16 EEPROM. The Compiler I am working on is MPLAB IDE v8.50 PIC C18 other header files included in i2c.h is pconfig.h ( just #defines and #ifndefs )

If any other query or req. info ask me in cooments. THANKS.

prog_SAHIL
  • 221
  • 3
  • 13
  • I want to fill my cup with water, but I can't find the water. Help me find it. I have a blue cup. <--That is the equivalent of what your question is asking. With that information, can you help me fill my cup ? No. You can't. You don't know the layout of the building I am in nor do you know if this building even has water (maybe they didn't pay their water bill). So look back at your question, and see if anyone can truly answer your question with all the "relevant" details you provided. – efox29 Jul 02 '15 at 12:38
  • Thnx @efox29 I will EDIT it right now. – prog_SAHIL Jul 02 '15 at 12:47
  • 1
    *"help me to put value more than 255 in unsigned char"* - as long as that unsigned char is 8 bits, you're never going to get more than 255 in it. – Roger Rowland Jul 02 '15 at 13:01
  • that is the problem see my [previous question](http://electronics.stackexchange.com/questions/176874/number-of-address-in-at24c16-eeprom-or-is-it-duplicate) – prog_SAHIL Jul 02 '15 at 13:11
  • 1
    Normally you can't have more than 128 devices on an I2C bus. Are you trying to implement 10 bit addressing? – Spehro Pefhany Jul 02 '15 at 13:14
  • @SpehroPefhany I read he question as trying to extend the parameter which specifies the memory address *in* the EEPROM, not the I2C bus address of the EEPROM. – brhans Jul 02 '15 at 13:50
  • @brhans Exactly, which makes me think he's not understanding that some of the 'data' **is** the EEPROM address- confusing I2C bus address with memory address, but before suggesting that I thought I'd eliminate the other possibility. – Spehro Pefhany Jul 02 '15 at 13:54

1 Answers1

2

These library functions are precompiled from source code by Microchip. The quotes below are taken from the C18 C Compiler Libraries reference manual.

Firstly some overview information about the compiled libraries:

The MPLAB C18 libraries are included in the lib subdirectory of the installation. These can be linked directly into an application using the MPLINK linker.

These files were precompiled in the c:\mcc18\src directory at Microchip. The directory src\traditional contains the files for Non-extended mode and src\extended contains the files for Extended mode. If you chose not to install the compiler and related files in the c:\mcc18 directory, source code from the libraries will not show in the linker listing file and cannot be stepped through when using MPLAB IDE.

Another quote suggests that the original source code is provided and can be rebuilt if required:

To include the library code in the .lst file and to be able to single step through library functions, follow the instructions in Section 1.3.3, Section 1.4.3 and Section 1.5.3 to rebuild the libraries using the supplied batch files (.bat) found in the src, src\traditional and src\extended directories.

However you are unlikely to be able to do what you are attempting. The libraries implement standard I2C, if you want more devices on the bus you may have to investigate a different protocol.

David
  • 4,504
  • 2
  • 25
  • 44