Serial Comms Between Propeller and SX
SailerMan
Posts: 337
This has been hammer in these forums before but I need to understand why this doesn't work
Propeller Code
SX Code
I can't seem to get this to work... Why doesn't the SX read the "!" Will the SX read serial data from the propeller seeing as the propeller's voltage is lower that the SX?
This is the full code.
Thanks,
Eric
Post Edited (SailerMan) : 1/6/2009 3:58:57 AM GMT
Propeller Code
Con _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 Var OBJ Serial :"FullDuplexSerial" Pub Main | Index Serial.Start(0,1,%0100,2400) Repeat Serial.STR(String("!")) WaitCnt (Cnt+10_000_000)
SX Code
DEVICE SX28, OSCHS3 FREQ 50_000_000 ID "Serial Input" ' ------------------------------------------------------------------------- ' IO Pins ' ------------------------------------------------------------------------- SerialIn Pin RA.1 Input ' LED pin AlarmLED Var RA.0 ErrorLED Var RA.2 Temp Var Byte Baud Con "T2400" ' ========================================================================= PROGRAM Start ' ========================================================================= Start: DO Serin SerialIn,Baud,Temp,50,Flash If Temp="!" Then Toggle AlarmLed Endif LOOP Flash: Toggle ErrorLED Goto Start
I can't seem to get this to work... Why doesn't the SX read the "!" Will the SX read serial data from the propeller seeing as the propeller's voltage is lower that the SX?
This is the full code.
Thanks,
Eric
Post Edited (SailerMan) : 1/6/2009 3:58:57 AM GMT
Comments
Here is a scope view of the Propeller Serial Out
Post Edited (SailerMan) : 1/6/2009 4:19:33 AM GMT