Menu

Serial2 HSerPrint

Boguslaw
2024-01-18
2024-01-18
  • Boguslaw

    Boguslaw - 2024-01-18

    Hi
    I have problem with send data by serial2
    by seria1 is HSerPrint "GCBASIC RS232 Test"
    but by serial2 should be HSerPrint ("GCBASIC RS232 Test",2) ?

    I have below configuration in PIC18F56Q71

    #define USART_BAUD_RATE 9600
    #define USART_TX_BLOCKING
    #define USART_DELAY OFF
    
      // Module: UART pin directions
                Dir PORTB.1 Out    ' Make TX2 pin an output
                // Module: UART2
                RB1PPS = 0x0018    // TX2 > RB1 11000
    

    Thanks Boguslaw

     
  • Boguslaw

    Boguslaw - 2024-01-18

    OK I know already
    should be

    #define USART2_BAUD_RATE 9600
    #define USART2_TX_BLOCKING
    #define USART2_DELAY OFF
    
     
  • Anobium

    Anobium - 2024-01-18

    Great spot.

    Ensure you use the InitPPS approach to include the #startup. This controls the initialisation of the serial setup.

    :-)

    #startup InitPPS, 85
    #define PPSToolPart 18F26Q71
    
    Sub InitPPS
    
            'pps stuff
    
    End Sub
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.