This Text file is old! In a 🏛️Museum, an unsorted archive of (user-)pages. (Saved from Geocities in Oct-2009. The archival story: oocities.org)
--------------------------------------- (To 🚫report any bad content: archivehelp @ gmail.com)
>

'Code by Shaun Wilson July 01/99
'This is code communicates with the MAX187 ADC. It receives
'the 12 bit repersention of the analog input and displays it
'in the debug screen.

'----------------Constants--------------------------------------
SCLK   	con	0	'serial clock pin 
CS		con	1	'chip select pin  
serData_in	con	2	'serial data into the Stamp
 
'----------------Varibles---------------------------------------
adc		var word	'12 bit result


'----------------Program---------------------------------------  		  

main: 	                             ' main program loop 	
		gosub convert        ' conversion subroutine
		gosub print	     ' output subroutine	
goto main

'----------------Subroutines---------------------------------------

print:	
		debug dec adc       'displays the result on the PC screen
return

convert:		
		low CS					      'start conversion
		Shiftin Serdata_in,SCLK,MSBPOST,[adc\12]      'read in converted signal	
		high CS 				      'stop conversion
return

Text file Source (historic): geocities.com/siliconvalley/orchard/6633

geocities.com/siliconvalley/orchard
geocities.com/siliconvalley

(to report bad content: archivehelp @ gmail)