CON _Clkmode = xtal1 + pll16x ' 80MHz _Xinfreq = 5_000_000 ' Pin Assignments _pHTx = 7 ' Connected to Rx on pH Stamp _pHRx = 8 ' Connected to Tx on pH Stamp _DebugTxPin = 30 _DebugRxPin = 31 _PhBaud = 38400 _DebugBaud = 57600 _BufferSize = 50 VAR byte messageBuffer[_BufferSize] OBJ Com[2] : "Parallax Serial Terminal" ' uses two cog PUB Main | localIndex, localAttmpts Com[0].StartRxTx(_DebugRxPin, _DebugTxPin, 0, _DebugBaud) Com[1].StartRxTx(_pHRx, _pHTx, 0, _pHBaud) waitcnt(clkfreq / 4 + cnt) Com[1].str(@endCmd) repeat Com[1].str(@readCmd) Com[1].StrIn(@messageBuffer) Com[0].char(13) Com[0].str(@messageBuffer) bytefill(@messageBuffer, 0, _BufferSize) waitcnt(clkfreq * 2 + cnt) DAT endCmd byte "E", 13, 0 readCmd byte "R", 13, 0 continuousCmd byte "C", 13, 0