You are on page 1of 1

SRF08 & HCS12 I2C setup help

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 pl
aced 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 alw
ays 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 th
en power cycle the SRF08 the LED should FLASH once plus a number of times depend
ing 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 delay
s that need to be added between reg writes etc on the HCS12 side. Does anyone ha
ve any example C code that works for this hardware setup?
Cheers
21st May 2006 05:19 AM #2
dknguyen
Pull up
What do you mean the pull-ups are too weak? Perhaps I misunderstand but if you p
lace another resistance in parallel with the "weak" pull-ups, you are reducing t
he resistance and making even more current flow?

You might also like