Led On Communication
Hi, I am a beginner in spin language and I would appreciate ideas on how to write a spin language code that expects to receive a number '1' from a matlab program and after receiving the number turns on a led of the PE microcontroller. This is my way to confirm that there is communication between MATLAB and the propeller chip.
Thank You
Thank You

Comments
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 rx = 31 tx = 30 baud = 9600 OBJ ser : "FullDuplexSerialPlus" PUB main | Number ser.Start(rx, tx, 0, baud) waitcnt(clkfreq+cnt) repeat Number := ser.rx if Number == "1" dira[16]~~ outa[16]~~Jim
s=serial('COM3','BaudRate',9600); fopen(s); ledon=[1]; fwrite(s,ledon) fclose(s);Thank You