Shop OBEX P1 Docs P2 Docs Learn Events
serial communication between propeller and C# — Parallax Forums

serial communication between propeller and C#

tHe GrEeKtHe GrEeK Posts: 1
edited 2007-06-22 15:09 in Propeller 1
Hello, I am investigating on the communication between propeller and the C# language, I could make the communication from propeller using library “PLX_DAQ”, capture the data and I show it (this correct one), now shipment a data from C# towards propeller, I capture from spin but this not showing verdader value to me, or not really like doing it from the language spin.

what I want to do is to catch leds according to the commando executed from c#

Them attached code:

spin


· · _xinfreq····· = 5_000_000········· '' 5 MHz
· _clkmode····· = xtal1 + pll16x···· '' 80 MHz via a X16 PLL

OBJ
······· Serial···· : "PLX-DAQ"
·······
PUB Main | row

· Serial.start(31,30,0,19200)·

· dira[noparse][[/noparse]0..3] := %111
· row := 0

··· repeat
····· row := Serial.Rx
····· Serial.Data(row)
····· outa[noparse][[/noparse]0..3] := %111·
····· case row
······· 3:
········· outa[noparse][[/noparse]0..3] := %111
········· waitcnt(clkfreq / 2 + cnt)
········· row := 0
······· 2:
········· outa[noparse][[/noparse]0..3] := %110
········· waitcnt(clkfreq / 2 + cnt)
········· row := 0
······· 1:
········· outa[noparse][[/noparse]0..3] := %100
········· waitcnt(clkfreq / 2 + cnt)
········· row := 0
······· OTHER:
········· outa[noparse][[/noparse]0..3] := %000
········· waitcnt(clkfreq / 2 + cnt)



translate by google
Sign In or Register to comment.