'R_W.BAS ' ' Shows how to write and read from EEPROM. This might be useful in ' data acquisition. In this program, the a_to_d readings are fudged. ' 'P. H. Anderson, MSU, 17 Nov, '96 symbol bottom_prog=b2 symbol top_var=b3 symbol ptr=b4 symbol a_d_reading=b5 symbol n=b6 symbol value=b7 dirs=%00001111 pins=%00000000 a_d_reading=0 read $ff, bottom_prog 'get the botton of the program debug bottom_prog top_var=bottom_prog-1 'locate first variable just below it for n=0 to 50 gosub a_d 'make a/d readings and save them ptr=top_var-n write ptr, a_d_reading gosub delay next for n=0 to 50 'now display these ptr=top_var-n read ptr, value debug value next end a_d: ' place your a/d code here 'this is just a fudge to generate some va;ue a_d_reading=a_d_reading + 2 return delay: pause(1000) return