writeI2c data conversion like serial?

hockeyrink

New Member
I've got an I2C LCD panel I'm trying to help a customer use (Hi, I'm Dave from Solarbotics/HVWTech!), but we're finding we can only use the I2C interface to write strings:

writeI1C pin0,("string")

We'd like to dump evaluated variables like the serout command does by prepending a "#" to the variable, but we're getting a syntax error.

Am I write in guessing this means that writeI2C won't let us evaluate variables in this way like the serout command does?

Thx,
Dave
 

hockeyrink

New Member
Solution?

My customer thinks he found the answer:

He's using the Data Logger that uses the 18x. He says that version has a limited I2C instruction set, so it needs to be a 28x1 or 40x.

I haven't confirmed it, but there it is for future generations of Intarweb readers...
 

Mycroft2152

Senior Member
this is the first time this has come up.

It seems very strange that the 18X would have a limited I2C instruction set, though it is possible as compared to the 28 and 40. Which version of the 18X is he using?

The new 28X1 and 40X1 do have extra I2C functionality Look at the addtional set of I2C commands on page 48 in the BASIC Command manual that start with hi2c...

Technical will need to jump in on this one.

Myc
 
Last edited:

hippy

Technical Support
Staff member
It's not clear what the exact problem is. The 18X, 28X1 and 40X1 support I2C commands but I2C can also be bit-banged from any other PICAXE.

Sending a number via I2C ( as # is used in SEROUT ) means having to break the number down to individual digits first, convert them to cheacters and then send them. The BINTOASCII command will help here and a Forum Search should show other ways to do that as well.
 
Top