I am trying to get my HCS12 to communicate with an SRF08 I recently got ahold of. Specifically my uP board is a Adapt9S12DP256. On the SDA & SCL lines I have placed 4K7 pull ups, as I believe the pull ups in the HCS12 are too weak?? Anyway, the code I wrote to read & write reg's on the SRF08 doesn't seem to work. When I read reg 0 I am seeing a value of 8? Is this right? All other register are always 0, all the time? I am not sure if I am writing properly to the device either as if I attempt to re-program the SRF08 address to something other than 0xE0 then power cycle the SRF08 the LED should FLASH once plus a number of times depending on your offset from 0xE0, right? Mine flashes once always, meaning I am prob not writing to the device either. I know that there are some rather funky delays that need to be added between reg writes etc on the HCS12 side. Does anyone have any example C code that works for this hardware setup?
Cheers
Cheers