New Example 3: Bit‑Level Access Using Constants

    #Option Explicit
    #Chip 16F1825, 32

    Dim SerialByte As Byte = 0

    #Define StatusReady  SerialByte.0
    #Define StatusError  SerialByte.1
    #Define StatusMotor  SerialByte.2

    Do
        SerialByte = SerialByte + 1

        If StatusReady = 1 Then
            StatusError = 0
        End If

        If StatusError = 1 Then
            StatusMotor = 0
        End If
    Loop

For more help, see: SerPrint for string handling examples and Variables Types for more information on variable types.