Skip to content

SISAM Protocol

SISAM uses RTS/CTS flow control for reading command and DTR flow control for sending acquired data. This means that PC should set RTS before sending commands and watch for CTS (e.g. use CTS sensitivity option). When PIC goes into data acquisition mode, it sends an ASCII string starting with Y4-MODE: followed with new mode description. This description can be directly used with mode command or with BuildCommDCB function.

PC should change the COM port mode as directed. Since the mode description contains rts=off dtr=on, DTR will be set SPACE signaling that PC is ready to receive acquired data.

PC stops Data acquisition by setting DTR to MARK and restoring 115200 baud rate.

If during data acquisition PIC encounters an error, it signals a BREAK, e.g. holds RX in SPACE until PC sets DTR to MARK. PIC does not leave error state until PC holds RTS MARK, therefore, to recover from error state, PC should restore baud rate 115200, set RTS to SPACE and read error message.

When data acquisition is performed with sync flag and PC needs to break waiting, it should alter TX line. If CTS sensitivity option is applied to COM port, WriteFile to the port will not succeed, SetCommBreak should be used instead. After this PIC will enter a error sate which should be cleared as stated above.

Initial state

    PC opens port for normal operation: baud=115200 parity=N data=8 stop=1 octs=on dtr=off rts=of

Sending a command to SISAM

PIC is in IDLE state

    1. PC sets RTS=SPACE
    2. PIC confirms by setting CTS=SPACE
    3. PC sends commnd(s)
    4. PIC sets CTS=MARK
    5. PC continues transmission
    6. PC completes transmission
    7. PC sets RTS=MARK
    8. 2 ms timeout
    9. On either of (7) or (8) PIC accepts command
    10. PIC sends new COM port mode
    11. PC changes COM port mode
    12. PC signals START by setting DTR=SPACE

PIC is in WAIT state

    13. PIC sends data

PIC is in ACQUIRE state

    14. PC signals STOP by setting DTR=MARK
    15. PIC stops transmission
    16. PC restores COM port mode

PIC is in IDLE state

SISAM Send Command Diagram

Output stream format

PIC sends acquired data as described below

S,J: Sampled bits are packed into octets (bytes) in LSB order (less significant bit first) and sent to the output stream
X: Sampled bits are packed into LSB bytes and sent to the stream by turns, channel 0 comes first
M: Time between signal alternations is measured in ticks and sent as WORD (16 bit unsigned integer with LSB bit ordering). Zero has special meaning ??“ no alternation occurred in 0xFFFF ticks.

Post a Comment

Your email is never published nor shared. Required fields are marked *