CMPS14 Change

John Todd

Member
Sorry if this is classed as new thread
Re CMPS14
Thanks to Hippy and others re problems with CMPS14
much appreciated!!
I have decided to use the
CMPS14 I2C Interface using
"14M2 and I2C Interface."
also incorporating a
9600 Serial Port to an OpenLog Card Logger
------------------------------------------------
The problem being is that I have no experience using I2C
I am no longer a young man and have difficulties understanding
the use of this method, and as this project is for personal use only,
Could I prevail on the forum to give me some help with code that would form
the basis of a new design.
Thank you,
John
 

hippy

Senior Member
One word of caution I'd give is that if it has stopped working for serial, there's a good possibility that whatever is wrong means it won't work with I2C either.

The datasheet I have is a little lacking on I2C use and not much found on-line so far. Without digging further I would guess ...
Code:
#Picaxe 08M2
#Terminal 4800
#No_Data

Symbol direction = w1 ; b3:b2
Symbol dir.lsb   = b2
Symbol dir.msb   = b3

HI2cSetup I2CMASTER, $C0, I2CSLOW, I2CBYTE
Do
  HI2cOut $00,($13)
  Pause 100
  HI2cIn  $02,(dir.msb,dir.lsb)
  SerTxd( "Direction = ", #direction, CR, LF )
  Pause 1000
Loop
 
Top