PDA

View Full Version : I2C writing hex value



kevlar129bp
- 4th December 2010, 02:01
Hello all,

Well, I've got a quick question for one of you, before I potentially make this alarm panel an expensive paperweight. What I need to do is write the HEX characters to the i2c memory slot.
If I do this:


WriteValue = $05
EEAddress = 3160
gosub WriteEEprom

WriteEEprom:
I2Cwrite DPIN,CPIN,$A0,EEAddress,[WriteValue]
pause 500
LCDout $fe, 1
LCDout $fe, 2,"WRITING ADDR: ", DEC EEAddress
Lcdout $fe, $C0,"DEC VAL = ", dec WriteValue
Lcdout $fe, $94,"HEX VAL = ", HEX WriteValue
hserout [dec EEAddress,"= DEC ",dec WriteValue," HEX ",HEX WriteValue,13,10]
return

Am I going to write "05" in the slot? Am I over-thinking this thing? Just don't want to doom the alarm panel! :eek:
Thanks for the help guys,
Chris

kevlar129bp
- 4th December 2010, 02:14
I am so impatient! No worries, it worked :).

Thanks for lookin' anyhow.

Chris