I am using PIC18F2450 which doesn't have hardware I2C pins.Isn't I2CWRITE just a software solution and not using actual hardware?
here is arduino code:
Code:#include <Wire.h> void setup() { Wire.begin(0x26); // join i2c bus with address Wire.onReceive(receiveEvent); Serial.begin(9600); } void loop() { delay(1000); } void receiveEvent(int howMany) { while (1 < Wire.available()) { char c = Wire.read(); Serial.print(c); } int x = Wire.read(); Serial.println(x); }




Bookmarks