I've written a code to communicate with a RTC via I2C but I can't seem to get it working. Using the osciloscope I can see that the CLK signal only outputs 2 bits... When I changed the slave addr to 0x78 it outputs 4 bits. When a bit goes to 0 in the slave addr the bus just stays low and nothing else happens. If the TWIBHD is not set, the processor hangs. I've attached my code which is made up of tons of other example codes in this forum.
If anyone can help me this, I'd appreciate the help.