I have the datasheet of RA8875 and i want to setup the I2C protocol. I have added pages from the datasheet for the I2C
I need to know if beginTransmittion(address) sends the first the first byte to the slave device the IICA[5:0](that contains the address plus the RS/RW. If this is correct does the next function could do the work?
The same question exist for the function requestfrom(address,bytes);
serveral codes before when reading before request from use beginTransmissino(addesss) followed by a Wire.write(0) and endTransmittion(). The the use requestfrom(ardderss,bytes).
Isn't it correct if i do just requestfrom and then wire.read() ass shown in one of the sites examples?
Also the photos show that there is an Anckowledge bit that i do not know how to implement it
Please check the photos in order to understand what i am asking. in order to write to a register you have to start the communication send the register and then read or write data to it. The first byte that it is send has the address of the device and the type of the command(read/write) and then you send the register you want to write or the one that you want to read.I was wandering if the request from or the begingTransmittion is that first byte according the photos.
Also i need to know if it is the correct way to use the requestfrom function is this way: