Does anoybody kow what value to change for:
in fpc-avr/src/examples/i2c/i2ctest.pp
With the I2C scan results as in attachment?
Greet, Wouter van Wegen, PascalByThree
Or is $68 always the right value?
procedure readDS1307;
var
s, m, h: byte;
begin
i2c_master.init(I2C_100kHz);
i2c_master.start($68, I2C_ReadMode);
i2c_master.readByte(s, true);
i2c_master.readByte(m, true);
i2c_master.readByte(h, true);
i2c_master.stop;
uart.uart_transmit('***********************'+#10+#13);
uart.uart_transmit('S: '+IntToStr(s)+#10+#13);
uart.uart_transmit('M: '+IntToStr(m)+#10+#13);
uart.uart_transmit('H: '+IntToStr(h)+#10+#13);
uart.uart_transmit('***********************'+#10+#13);
end;
The example code form FPC-AVR on Github is not working yet.
Can somebody help me debugging this stripped code? It only displays 105 seen in this attachment.
IMG_1464_SNAP.jpg
is the fpc-avr/src/examples/i2cscan/i2cscan.pp example application result.
This is all because i am still working on the digital part of my LI-ION charger, with 4 ports on it. Going to expand it with relais en a nice display, temperature sensor, digital ammeter, AVR!, rotary encoder, and offcource a real time clock.
PS: The analog part is just working fine already.