24LC128 communication
I have a 24LC128 external eeprom and a BS2 Homework board and I need help with a two simple codes, one to write to it and one to read from it. I have a sample code that came with the eeproms documentation < 24LC128.bs2 > but I dont know what I need from it, and what is just part of that specific program. My goal is to have on writing program that uploads a bunch of data to the eeprom and then another program that would replace the "get_data:" subroutine in this program <Untitled2newest.bs2> and be able to read the data from the beginning multiple times.
Correct me if Im wrong but I think I need the I2C_Stop, 1C2_Start, Addrs, and Write_Data subroutines from the first program, but Im not sure if I need the Control_Byte_Write or the Control_Byte Read. Also, which parts of the DATA from the second program will I need to write on the eeprom? The program OUTS the data in binary and I thing if the reading program gets the data in binary then it could just OUTS the data as is.
Thanks for your help
Correct me if Im wrong but I think I need the I2C_Stop, 1C2_Start, Addrs, and Write_Data subroutines from the first program, but Im not sure if I need the Control_Byte_Write or the Control_Byte Read. Also, which parts of the DATA from the second program will I need to write on the eeprom? The program OUTS the data in binary and I thing if the reading program gets the data in binary then it could just OUTS the data as is.
Thanks for your help
bs2
![](/plugins/FileUpload/images/file.png)
4K
Comments
I assume you will need all the DATA items in the second program. It looks like a table with two values per entry taking up 3 bytes, one a 16-bit word and the other an 8-bit byte.
Remember that your second program uses the built-in program EEPROM to store the DATA items. The READ statement reads from the built-in EEPROM and the Stamp Editor stores the DATA items in the EEPROM. You're just substituting another EEPROM for the data and the subroutine calls for the READ statement since the READ statement doesn't know about external EEPROMs.
Thanks