Excellent Explanation MEL,
You were right again as you always are , it was due to the way i was writting and reading from the eeprom i made the adjustments you recommended and its magic....
I really appreciate your helping hand

Toni

The pr
DEFINE LOADER_USED 1 ' uses a bootloader
Include "Modedefs.Bas"


Define OSC 20
clear

' Setup Hardware for uart
DEFINE HSER_BAUD 19200
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_CLROERR 1

@ device pic16F877, HS_osc, wdt_off, pwrt_on, protect_off

' Hardware Defines
' ----------------

SCL VAR PORTC.3 ' I2C clock pin
SDA VAR PORTC.4 ' I2C data pin

' Software Defines
' ----------------
' ** Declare the Variables **
Temp VAR WORD ' General Purpose
Data_Out VAR WORD ' Data read from the Eeprom
Data_In VAR byte ' Data written to the Eeprom
address VAR WORD ' Address

' added Software Defines
' ----------------

DataW var WORD [20] ' Array big enough for your needs
I2Caddress var BYTE ' Device Address
MessageAddress var WORD
' Starting Address of Data in external EEPROM
MessageLen var BYTE
' Number of WORD Array Elements to load (Min=1, Max=128)
TempA var BYTE ' Temporary BYTE Counter
TempB var BYTE ' Temporary BYTE Counter
TempC var BYTE ' Temporary BYTE Counter
TempW var WORD ' Temporary WORD Variable
CounterA var word
index var byte '
'
' Initialise Hardware
' -------------------
ADCON1=7
TRISA=%00000000
TRISB=%00000000
TRISC=%10000000
TRISD=%00000000


Data_Out=0: Data_In =0: Temp =0


'WRITE SUB
'=======
for CounterA = 0 TO 98 STEP 2 ' Loop 50 times
Address=CounterA
Data_In =Temp.LowByte ' Data_In is data TO EPPROM
I2CWrite SDA,SCL,%10100000,address,[Data_In] ' Write each 2 location
Pause 10 ' Delay 10ms after each write
address = address +1
Data_In =Temp.HighByte ' Data_In is data TO EPPROM
I2CWrite SDA,SCL,%10100000,address,[Data_In] ' Write each 2 location
Pause 10 ' Delay 10ms after each write
Temp =Temp + 100
Next CounterA


HSerout [" Array Values " ,10,13]
HSerout [" ****************************************" ,10,13]
HSerout ["(0) (1) (2) (3) (4) (5) (6) (7) (8) (9)" ,10,13]

loop:

'This is all you need in your program each time you want to acquire a message....

MessageAddress=10 ' Starting address for data
MessageLen=10 ' Remember this is the number of WORDS to load
'Gosub GetwordData ' Load from EEPROM into WORD array


'READ SUB
'=======

for index = 0 to 9
Gosub GetwordData ' Load from EEPROM into WORD array
HSerout [ dec DataW(index)," " ]
Pause 1000
next index
HSerout [10,13]
GoTo loop

End



GetWordData:
TempB=MessageLen*2-1
I2CAddress=$A0
For TempA=0 to TempB
TEMPW=MessageAddress+TempA
I2CRead SDA,SCL,I2CAddress,TempW,[TempC]
DataW.lowbyte(TempA)=TempC
Next TempA
Return
ogram below
=============