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 OBJ Com[2] : "FullDuplexSerial" ' uses two cog PUB Main | localIndex, localAttmpts Com[0].start(_DebugRxPin, _DebugTxPin, 0, _DebugBaud) Com[1].start(_pHRx, _pHTx, 0, _pHBaud) waitcnt(clkfreq / 4 + cnt) repeat result := Com[0].rxcheck if result <> -1 and result <> 0 Com[1].tx(result) result := Com[1].rxcheck if result <> -1 and result <> 0 TbugTx(result) PRI TbugTx(localCharacter) if (localCharacter > 31 and localCharacter < 127) or localCharacter == 13 Com[0].tx(localCharacter) else Com[0].tx(60) Com[0].tx(36) Com[0].hex(localCharacter, 2) Com[0].tx(62)