Ok I Give Up :( I2cwrite And Read
HERE ARE THE CODES I REALLY CAN'T FIND THE PROBLEM.I READ MELANIE'S (I2CRead & I2CWrite not working as expected)AND TRYED EVERYTHING BUT NOT WORKING
I AM USEING
16F877 AND 24C02 AND EVERY THING CONNECTED WELL.
'''''''''''THE CODES
DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTD
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTD
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
adcon1=7
kont var byte
kont = %10100000
adr var BYTE
adr =2
B2 VAR BYTE
B2=0
B VAR BYTE
B=145
loop:
if portb.0=0 then goto wrt
if portb.1=0 then goto wrd
goto loop
wrt:
lcdout $fe,1
lcdout "YAZILIYOR..."
I2CWRITE PORTC.4,PORTC.3,kont,adr,[B]
PAUSE 1000
lcdout $fe,1
lcdout "YAZILDI...."
GOTO LOOP
wrd:
I2CREAD PORTC.4,PORTC.3,kont,adr,[B2]
PAUSE 30
lcdout $fe,1
lcdout "OKUNAN:",#B2
GOTO LOOP
END
IN THE PICTURE U CAN SEE THE PROBLEM WELL
WHERE IS THE PROBLEM????
Attached Images
Last edited by SuB-ZeRo; - 11th July 2005 at 02:28 .
Asking is not a shame but not learning is a SHAME!!!
Bookmarks