Bert,
Thanks for the quick reply
OK more info - one other question how do I get my code into the scrolling window?

I have a line in there :- i2cread DPin,CPin,$90,1,[c], if I take it out the code doesnt work.


Code

DEFINE osc 20
DEFINE LOADER_USED 1
INCLUDE "MODEDEFS.BAS"
DEFINE I2C_SLOUT
ANSEL =%00000001 ' Enable ADC channel-AN0
ANSELH =%0000
'ADCON0.7 = 1
SSPCON =%00101011
TRISB.4 =0
TRISB.6 =0
TRISA =%00001111
TRISC =%00000000
CPin VAR PORTB.6
DPin VAR PORTB.4
a var word
c var byte

MAINLOOP
for a = 1 to 255
I2Cwrite DPin,CPin,$90,a
i2cread DPin,CPin,$90,1,[c]
next
goto Mainloop