|
CLASS DOCUMENTS
REPORTS & ASSIGNMENTS
CLASS CONTENT
USING THIS SITE
registered authors login here You are: (logout) For more on PMWiki, see pmwiki.org |
Serial Processing PicBy Chang Soo Lee Back to FSR Report.
'Basic serial communication
'Send data to Processing
'by Chang Soo Lee
'ITP, NYU
define OSC 4
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
SensorValue var word
SensorValueB var Byte
tx var portc.6
rx var portc.7
n9600 con 16468
TRISA = %11111111
ADCON1 = %10000010
Main:
ADCin 0, SensorValue
SensorValueB = SensorValue/4
serout2 tx, n9600, [SensorValueB]
pause 50
Goto main
|