Home > front end >  why does occurs this error :"undefined symbol:_i2c_port" in codevision AVR compiler?
why does occurs this error :"undefined symbol:_i2c_port" in codevision AVR compiler?

Time:08-28

I want to drive a si4734_D60 as a FM receiver by atmega8 through I2C. After compiling the code by'codevision AVR 3.12 advanced', No error occurs in "C" code but at last this error is displayed: "Error(s) occurred during assembly" and someof errors are: Error: C:\Users...\SI4734_receiver.asm(2346): Undefined symbol: __i2c_port that assembly code in line 2346 is:

    .equ __i2c_dir=__i2c_port-1

and you can find my project here: googledrive:Si4734.rar

I don't understand these errors. please help me about it.

CodePudding user response:

thank a lot to share your answer. i solved it.In help file of codevision in explain of I2C:

The prototypes for these functions are placed in the file i2c.h, located in the .\INC subdirectory. This file must be #include -d before using the functions.

These functions must be configured, by specifying the I/O port and bits used for communication through the I2C bus and the bit rate of the SCL clock. This is accomplished in the Project|Configure|C Compiler|Libraries|I2C menu: the Enable Bit-Banged I2C Support option must be activated · the I/O Port, SDA and SCL bits must be specified in Data Connection · the Bit Rate of the SCL signal must be set.

  • Related