desgin
Full Member level 1
Hello All,
I am working with mikroc Pro licence version.
I am using pic46k80 mikroc Controller.
I received 1 frame that is 8 bytes frame from CAN, Received at my controller side.
I want to send that 1 frame to another Controller through I2C.
How to do ? Please help me. In library they given like;
but i want to send full frame, how to send ?
I am working with mikroc Pro licence version.
I am using pic46k80 mikroc Controller.
I received 1 frame that is 8 bytes frame from CAN, Received at my controller side.
I want to send that 1 frame to another Controller through I2C.
How to do ? Please help me. In library they given like;
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 void main(){ ANSEL = 0; // Configure AN pins as digital I/O ANSELH = 0; PORTB = 0; TRISB = 0; // Configure PORTB as output I2C1_Init(100000); // initialize I2C communication I2C1_Start(); // issue I2C start signal I2C1_Wr(0xA2); // send byte via I2C (device address + W) I2C1_Wr(2); // send byte (address of EEPROM location) I2C1_Wr(0xAA); // send data (data to be written) I2C1_Stop(); // issue I2C stop signal Delay_100ms(); I2C1_Start(); // issue I2C start signal I2C1_Wr(0xA2); // send byte via I2C (device address + W) I2C1_Wr(2); // send byte (data address) I2C1_Repeated_Start(); // issue I2C signal repeated start I2C1_Wr(0xA3); // send byte (device address + R) PORTB = I2C1_Rd(0u); // Read the data (NO acknowledge) I2C1_Stop(); // issue I2C stop signal }
but i want to send full frame, how to send ?