serialport communication
TAMIL
Posts: 11
Hello all,
Here I have attached my work on serial port communication.
idea is to send bytes to propeller and store it in the memory. then read the same data and send it back to pc. i was using BS2 previously thts y i tried using same functions here.
is my approach right?
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
VAR
byte x
byte y
OBJ
BS2 : "BS2_Functions" ' Create BS2 Object
PUB Start
BS2.start (31,30) ' Initialize BS2 Object timing, Rx and Tx pins for DEBUG
x := BS2.SHIFTIN (31, 6, BS2#MSBPOST, 8)
BS2.Write(0, x,1)
y := BS2.Read_HighMem(0, 1)
BS2.SHIFTOUT(30,6,y,BS2#LSBFIRST,8)
Post Edited (TAMIL) : 9/25/2008 9:58:26 PM GMT
Here I have attached my work on serial port communication.
idea is to send bytes to propeller and store it in the memory. then read the same data and send it back to pc. i was using BS2 previously thts y i tried using same functions here.
is my approach right?
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
VAR
byte x
byte y
OBJ
BS2 : "BS2_Functions" ' Create BS2 Object
PUB Start
BS2.start (31,30) ' Initialize BS2 Object timing, Rx and Tx pins for DEBUG
x := BS2.SHIFTIN (31, 6, BS2#MSBPOST, 8)
BS2.Write(0, x,1)
y := BS2.Read_HighMem(0, 1)
BS2.SHIFTOUT(30,6,y,BS2#LSBFIRST,8)
Post Edited (TAMIL) : 9/25/2008 9:58:26 PM GMT
spin
106K
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.