PIC24FJ64GA306 Anomaly in USART 4


+ Reply to Thread
Results 1 to 4 of 4

Thread: PIC24FJ64GA306 Anomaly in USART 428 days old

  1. #1
    Senior Member GAMBOA's Avatar
    Join Date
    Nov 2004
    Posts
    422
    Thumbs Up
    Received: 19
    Given: 0
    Total Downloaded
    203.73 MB

    0 Not allowed!

    Default PIC24FJ64GA306 Anomaly in USART 4

    Hi list,

    OS: W10 Pro
    Proton24: 1.0.6.4
    Micro: Pic24FJ64GA306

    I have a development with a PIC24FJ64GA306 microcontroller in which I have used 3 serial ports (USART1, USART2 and USART3). All three ports use reception interruption and are working perfectly.
    Now I have introduced USART4 in the same way, with interruption.
    The problem arises when I write in the program the sentence HRSOUT4 "Anything". USART 1 stops receiving. If I delete the HRSOUT4 line, everything works normally again.

    I have verified that I can transmit with RSOUT without using the hardware with what the pins are correctly.

    I configure the ports in the procedure Inicializar()
    Code:
    '*************************************************************************
    '** PROCEDIMIENTO: Inicializar
    '** Inicializa los diferentes registros, salidas y entrads de perifericos
    '**
    '**
    '** Parametros de entrada:
    '** Parametros de salida:
    '**
    '*************************************************************************
      PROC Inicializar()
      'Definiciones de pines para los 4 puertos serie
      PPS_Output(cOut_Pin_RP24, cOut_Fn_U1TX); UART1 Transmit Connected to RP24
      PPS_Input(cIn_Pin_RP23, cIn_Fn_U1RX); UART1  Receive (U1RX)  Connected to RP23
      PPS_Output(cOut_Pin_RP6, cOut_Fn_U2TX); UART2 Transmit Connected to RP6
      PPS_Input(cIn_Pin_RP7, cIn_Fn_U2RX); UART2  Receive (U2RX)  Connected to RP7
      PPS_Output(cOut_Pin_RP9, cOut_Fn_U3TX); UART3 Transmit Connected to RP9
      PPS_Input(cIn_Pin_RP8, cIn_Fn_U3RX); UART3  Receive (U3RX)  Connected to RP8
      PPS_Output(cOut_Pin_RP22, cOut_Fn_U4TX); UART4 Transmit Connected to RP22
      PPS_Input(cIn_Pin_RP25, cIn_Fn_U4RX); UART4  Receive (U4RX)  Connected to RP25
    
      Inicializar_SPI()
    
      'REGISTER 9-1: OSCCON: OSCILLATOR CONTROL REGISTER
      OSCCON = %0001000110100110
        'bit 1 SOSCEN:32 kHz Secondary Oscillator (SOSC) Enable bit, =1 SOSC enable; =0 SOSC disable
    
      'REGISTER 9-2: CLKDIV: CLOCK DIVIDER REGISTER
      CLKDIV = %0000000000000000
        '000= 8 MHz (divide-by-1)
    
      'REGISTER 9-3: OSCTUN: FRC OSCILLATOR TUNE REGISTER
      OSCTUN = %0000000000000000
        '000000= Center frequency, oscillator is running at factory calibrated frequency
    
      TMR1_Inicializar()
      TMR2_Inicializar()
      TMR3_Inicializar()
      UART1_Inicializar()
      UART2_Inicializar()
      UART3_Inicializar()
      UART4_Inicializar()
    
      VerProtocolo =CREAD PERFIL_ACTIVO + 14 'leo la version del protocolo de la memoria Flash
      VerProtocolo = VerProtocolo + 48  'Lo paso a ASCII porque siempre se usa en ascii
      Depuracion = CREAD PERFIL_ACTIVO + 9 'Leo el numero de pista
      CentinelaVive = 0
      TestigoVive = VIVECONECTADO 'Supongo que hay conexión al arrancar
      SMensaje[0]=0
      SMensaje[1]=0
      SMensaje[2]=0  'Este valor siempre es cero como terminador
    
    
      ENDPROC
    Initialization of UARTx

    Code:
    '*************************************************************************
    '** PROCEDIMIENTO: UART1_Inicializar
    '** Ajusta el USART1 para funcionar segun queremos
    '** La USART1 se utiliza con el XPORT, con lo que para nosotros es el puerto ETHERNET
    '**
    '** Parametros de entrada:
    '** Parametros de salida:
    '**
    '*************************************************************************
      PROC UART1_Inicializar()
    
        DECLARE HSERIAL_BAUD = 9600
        DECLARE HRSOUT1_PIN = PORTD.1 ' Selecciona pin para TX en USART1
        DECLARE HRSIN1_PIN = PORTD.2  ' Selecciona pin para RX en USART1
    
    '    'Preparo el UART1 para interrupcion de recepcion
        IFS0bits_U1RXIF = 0 'Flag de interrupcion de recepcion RX1
        IEC0bits_U1RXIE  = 1 'Habilitar interrupcion de recepcion RX1
    
      ENDPROC
    '** FIN PROCEDIMIENTO: UART1_Inicializar
    
    
    '*************************************************************************
    '** PROCEDIMIENTO: UART2_Inicializar
    '** Ajusta el USART2 para funcionar segun queremos
    '**
    '**
    '** Parametros de entrada:
    '** Parametros de salida:
    '**
    '*************************************************************************
      PROC UART2_Inicializar()
    
        DECLARE HSERIAL2_BAUD = 9600
        DECLARE HRSOUT2_PIN = PORTB.6 ' Selecciona pin para TX en USART2
        DECLARE HRSIN2_PIN = PORTB.7  ' Selecciona pin para RX en USART2
    
        'Preparo el UART1 para interrupcion de recepcion
        IFS1bits_U2RXIF = 0  'Flag de interrupcion de recepcion RX2
        IEC1bits_U2RXIE = 1 'Habilitar interrupcion de recepcion RX2
    
      ENDPROC
    '** FIN PROCEDIMIENTO: UART2_Inicializar
    
    
    '*************************************************************************
    '** PROCEDIMIENTO: UART3_Inicializar()
    '** Ajusta el USART3 para funcionar segun queremos
    '**
    '**
    '** Parametros de entrada:
    '** Parametros de salida:
    '**
    '*************************************************************************
      PROC UART3_Inicializar()
    
        DECLARE HSERIAL3_BAUD = 9600
        DECLARE HRSOUT3_PIN = PORTB.9 ' Selecciona pin para TX en USART3
        DECLARE HRSIN3_PIN = PORTB.8  ' Selecciona pin para RX en USART3
    
        'Preparo el UART1 para interrupcion de recepcion
        IFS5bits_U3RXIF = 0  'Flag de interrupcion de recepcion RX3
        IEC5bits_U3RXIE = 1 'Habilitar interrupcion de recepcion RX3
    
      ENDPROC 'UART3_Inicializar()
    
    
    '*************************************************************************
    '** PROCEDIMIENTO: UART4_Inicializar()
    '** Ajusta el USART4 para funcionar segun queremos
    '**
    '**
    '** Parametros de entrada:
    '** Parametros de salida:
    '**
    '*************************************************************************
      PROC UART4_Inicializar()
    
        DECLARE HSERIAL4_BAUD = 9600
        DECLARE HRSOUT4_PIN = PORTD.3 ' Selecciona pin para TX en USART4
        DECLARE HRSIN4_PIN = PORTD.4  ' Selecciona pin para RX en USART4
    
        'Preparo el UART1 para interrupcion de recepcion
        IFS5bits_U4RXIF = 0  'Flag de interrupcion de recepcion RX4
        IEC5bits_U4RXIE = 1 'Habilitar interrupcion de recepcion RX4
    
      ENDPROC 'UART3_Inicializar()
    If someone has used the 4 UARTS without problems and can point out any solution, they will be welcome. Thank you.

    Regards.
    Gamboa

Attention
×

This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

The advertisements we display are relevant to this web site and your browsing history

Please consider supporting us by disabling your ad blocker.


Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

If you can, please report issues in the forum area WebSite / Forum Issues


Thank you for your attention.

  • #2
    Junior Member Jimbird's Avatar
    Join Date
    Feb 2012
    Posts
    29
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    1.96 GB

    0 Not allowed!

    Default Re: PIC24FJ64GA306 Anomaly in USART 4

    Hello Gamboa,

    you are aware I'm working on adapting my PIC24FJ128GA306 board for another application that needs clock stretching support via the 2nd hardware I2C module.
    I still haven't made any progress on that issue if any readers are in a position to assist with Hbus2 type commands!

    as regards your query, I have used USART1, 2 & 4 for Tx & Rx, without issue as far as I have noticed.
    So far I did not have USART3 active at the same time because the Lin bus that it was dedicated to has not been needed yet.

    While I can't speak to the specifics of what you have found, I will include the code below that worked for me.
    In another few days I will have started testing USART4 again in this new application, so I hope I don't find any problems with it.did work!
    (I don't expect to, as I compiled the old code a couple of weeks ago and UARTS 1, 2 & 4 still work ok.)

    Hopefully you will find it helpful.

    Regards,
    Ian

    [By the way, my compiler version is same as yours.]

    lines included in my main file:
    Code:
    '========= DECLARES & INCLUDES ===============
    Device = 24FJ128GA306
    
    Declare Xtal = 16
    '
    Declare Stack_Expand = 1                    '19/07/18 - let proton adjust the stack size 
    Declare Stack_Size = 200
    Declare Access_Upper_64k = 1                '09/08/18 - used for ram >64k
    '...
    
    Include "usart4_buffer24_v2.inc"   'RPi int driven buffer
    
    '...
    pInit_USARTS()          'init uarts
    
    '...initislise buffers 1, 2 &
    
    USART4_Init()            'Init UART4 buffer
    
    '...
    This is the USART Init code. (Rest of the TRIS settings were done elsewhere.)
    Code:
    '------------------------------------------------------------
    ' config all ports for baud.  TRIS & PPS done elsewhere.
    '------------------------------------------------------------   
    Proc pInit_USARTS()
      bTrace = 10
          'While NOT using int on change, enable pull up on Rx pins to reduce eratic behaviour due to possible floating pins.
         'Pic_RPI_Rx (CN50) and PIC_DUT_Rx (CN70)
          Set CNPU1bits_CN11PUE         'enable pullup on Debug->PIC input
          Set CNPU1bits_CN12PUE         'enable pullup on LIN->PIC input
          Set CNPU4bits_CN50PUE         'enable pullup on RPi->PIC input 
          Set CNPU5bits_CN70PUE         'enable pullup On DUT->PIC Input 
      
        'UART1 - DEBUG OUTPUT
        Declare Hserial1_Baud 19200
        Declare HRSOut1_Pin PORTB.5
        Declare HRSIn1_Pin  PORTB.4                    ' Select which pin is to be used for RX with USART1
        Declare Hserial1_Clear On
        
        'UART2 - TO/FROM DUT
        Declare Hserial2_Baud 19200
        Declare HRSOut2_Pin PORTF.3                   ' pin # 33
        Declare HRSIn2_Pin PORTF.2                    ' pin # 34. Select which pin is to be used for RX with USART2
        Declare Hserial2_Clear On   
        
        'UART3 - TO/FROM LIN
        Declare Hserial3_Baud 19200
        Declare HRSOut3_Pin PORTB.9
        Declare HRSIn3_Pin = PORTB.15                    ' Select which pin is to be used for RX with USART3
        Declare Hserial3_Clear On 
        
        'UART4 - to/From RPi
        Declare Hserial4_Baud 19200
        Declare HRSOut4_Pin PORTD.2
        Declare HRSIn4_Pin = PORTD.1                    ' Select which pin is to be used for RX with USART4s
        Declare Hserial4_Clear On 
    
    ' Setup the Peripheral Pin Select for UARTS
    ' see http://www.protonbasic.co.uk/archive/index.php/t-75021.html
    ' & http://www.protonbasic.co.uk/content.php/4466-16-bit-devices-Peripheral-Functions-Pins-and-PPS
    '
        Output PORTB.5      'utx1
        Output PORTF.3      'utx2
        Output PORTB.9      'utx3
        Output PORTD.2      'utx4
        Input portd.1          'Urx4
        
        
        '== USART1
        PPS_Output(cOut_Pin_RP18, cOut_Fn_U1TX)     ; UART1 Transmit Connected to RP18
        PPS_Input(cIn_Pin_RP28, cIn_Fn_U1RX)        ; UART1  Receive (U1RX)  Connected to RP28
        '== USART2
        PPS_Output(cOut_Pin_RP16, cOut_Fn_U2TX)     ; UART2 Transmit Connected to RP23
        PPS_Input(cIn_Pin_RP30, cIn_Fn_U2RX)        ; UART2  Receive (U2RX)  Connected to RP24
        '== USART3
        PPS_Input(cIn_Pin_RP29, cIn_Fn_U3RX)        ; UART3  Receive (U3RX)  Connected to RP29
        PPS_Output(cOut_Pin_RP9, cOut_Fn_U3TX)      ; UART3 Transmit Connected to RP9
        '== USART4
        PPS_Input(cIn_Pin_RP24, cIn_Fn_U4RX)        ; UART4  Receive (U4RX)  Connected to RP24
        PPS_Output(cOut_Pin_RP23, cOut_Fn_U4TX)     ; UART4 Transmit Connected to RP23
    
    
    
    EndProc  'pInit_USARTS
    an example of the UART4 receive is below.
    (I don't normally use the TimeOut variant, but found it was much safer for the overall behaviour of the uC.)
    Code:
    '...
    Repeat 
      wRxHeaderSYNC.Byte1 =  wRxHeaderSYNC.Byte0
      wRxHeaderSYNC.Byte0 = HRSIn4, {1,U4TO}
    Until wRxHeaderSYNC = cRPiSync                      'pick up SYNC word, then jump to rest of header & payload
    '....
    Below is the contents of "usart4_buffer24_v2.inc"
    (It's based on Les's example with a few small changes.)

    Code:
    ' "usart4_buffer24_v2.inc"
    ' dSCU2, USART4 = RPi SERIAL BUFFER.  (INPUT PINS: RX=RD1 PIN 49, TX=RD2=PIN50
    ' ===============================================================================
    ' v1 21/07/17 - add buffer_count value to track the length od data read in and out
    ' v2 19/08/17 - change buffer pointers to byte size. FIX byte read error - ISR needed fifo enpty check.
    '    12/10/17 - corrected PRTA1 error in TimeOut version
    
    $ifndef _USART4_Buffer24_inc_
    $define _USART4_Buffer24_inc_
    '
    ' Buffered USART receiver that replaces the compiler's Hrsin command library routines, both with and without timeout
    '
    ' For use with the Proton24 compiler version 1.0.1.0 onwards
    '
    ' The compiler will produce the following hooks for use with #ifSym:
    ' __SYSCOM_HRSIN4_REQ_      for the HRSIn command without timeout
    ' __SYSCOM_HRSIN4_TO_REQ_   for the HRSIn command with timeout
    '
        #Disable HRSIn4, HRsin4To                           ' Disable the compiler's Hrsin (with and without timeout) library routines
    '
    ' Default size of the RX buffer
    '
    $ifndef cUSART4_RXBufferSize
        $define cUSART4_RXBufferSize 700      
    $endif  
    '
    ' Create some variable for use with the interrupt buffer
    '    
        Dim _USART4_bBuffer[cUSART4_RXBufferSize] As Byte    ' The RX buffer
        Dim _USART4_wIndexIn As Word  System                      ' Data in pointer
        Dim _USART4_wIndexOut As Word System                      ' Data out pointer
        Dim _USART4_Buffer_Count As Word System                   ' chars in buffer   
        'Dim USART4_tOverrun As Bit                          ' Buffer Overrun flag declare moved to Serial DEFs file
    
        $define cHrsin4_TimeoutPadding $eval ((113 * _xtal) / 2) - 1 ' Hrsin1 timeout delay padding    
    '-------------------------------------------------------------------------------------------
    ' Enable the USART4 Interrupt                                    
    '
    $define USART4_IsrEnable() Set IEC5bits_U4RXIE
    
    '-------------------------------------------------------------------------------------------
    ' Disable the USART4 interrupt
    '
    $define USART4_IsrDisable() Clear IEC5bits_U4RXIE
    
    '-------------------------------------------------------------------------------------------
    ' Reset the buffer variables                              
    '
    Proc USART4_BufferReset() 
    
        USART4_IsrDisable()                             ' Disable the USART4 interrupt
        USART4_tOverrun = 0                             ' Reset the Overrun flag
        Clear _USART4_bBuffer                           ' Clear the buffer
        Clear _USART4_wIndexIn                          ' \
        Clear _USART4_wIndexOut                         ' / Reset the data in and out pointers
        Clear _USART4_Buffer_Count                      ' clear buffer counter
        Clear IFS5bits_U4RXIF                           ' Clear the interrupt request flag
        USART4_IsrEnable()                              ' Enable the USART4 interrupt
    EndProc
    
    '-------------------------------------------------------------------------------------------
    ' Initialise the buffer and the USART4 interrupt handler                               
    '
    Proc USART4_Init()  
    
        USART4_IsrDisable()                             ' Disable the USART4 interrupt
        USART4_tOverrun = 0                             ' Reset the Overrun flag
        Clear _USART4_bBuffer                           ' Clear the buffer
        Clear _USART4_wIndexIn                          ' \
        Clear _USART4_wIndexOut                         ' / Reset the data in and out pointers    
        Clear _USART4_Buffer_Count                      ' Dec our buffer counter
        IPC22bits_U4RXIP0 = 1                            ' \
        IPC22bits_U4RXIP1 = 1                            ' | USART4 interrupt priority
        IPC22bits_U4RXIP2 = 1                            ' /
        Clear IFS5bits_U4RXIF                           ' Clear the interrupt request flag
        USART4_IsrEnable()                              ' Enable the USART4 interrupt
    EndProc
    '
    '----------------------------------------------------
    ' USART4 interrupt handler to buffer incoming data
    ' while bytes are recived T2 is reset. no more bytes causes T2 ISR to flag timeout and
    ' trigger reading of u4 buffer. 
    Isr U4RXInterrupt
    
        #ifSym __SYSCOM_HSERIAL4_CLEAR_REQ_             ' Has the HSERIAL_CLEAR declare been used in the program?
            If U4STAbits_OERR = 1 Then                  ' Yes. So is there an overrun error?
                Clear U4STAbits_OERR                    ' Yes. So clear it
                GoTo Exit_USART4_Interrupt              ' Aad exit the interrupt
            EndIf
        #endIfSym
        'Clear TMR2                                      ' but keep resetting while bytes received
        Clear bTMR2_TOut_RPi
        Set T2_On                                       ' start timeout timer 
        Set fU4_RPi_T2_Started                          ' track which port started T2
        Set led5
        Repeat  
            _USART4_bBuffer[_USART4_wIndexIn] = U4RXREG     ' Read a data byte from the USART
            Inc _USART4_wIndexIn                                ' Move up the buffer
            Inc _USART4_Buffer_Count                            ' Dec our buffer counter
            If _USART4_wIndexIn > cUSART4_RXBufferSize Then     ' Has the buffer been filed?
                Clear _USART4_wIndexIn                          ' Yes. So reset the in pointer
            EndIf
            '
            ' Check for a buffer overrun. Flag USART4_tOverrun must be cleared in the main program 
            '   
            If _USART4_wIndexIn = _USART4_wIndexOut Then USART4_tOverrun = 1
    
        Until U4RX_FIFO = 0                            'read to buffer UNTIL FIFO empty
        
    Exit_USART4_Interrupt:
        Clear IFS5bits_U4RXIF                           ' Clear the interrupt request flag
    EndIsr                                              ' Exit the interrupt handler
    'EndProc       
    '----------------------------------------------------------------------------
    #ifSym __SYSCOM_HRSIN4_REQ_, __SYSCOM_HRSIN4_TO_REQ_ 
        GoTo _BufferedHrsin4_Main
    #endIfSym
    '----------------------------------------------------------------------------
    ' Hrsin replacement code with timeout
    ' Input     : PRTA1 = timeout value
    ' Output    : WREG0.Byte0
    '           : Carry flag clear if timed out
    ' Notes     : Follows exactly the method used by the compiler's library routine
    '
    #ifSym __SYSCOM_HRSIN4_TO_REQ_
    __hrsin4__to:
        'Input __HRSIN4_PORT.__HRSIN4_PIN            ' Make the Hrsin1 pin an input (just in case it is altered elsewhere)    
        Push.d WREG2                                ' Save WREG2 and WREG3
        WREG2 = PRTA1                               ' Move the timeout value (passed from the command) to WREG2
        Clear WREG3                                 ' Clear the inner loop counter
        While                                       ' Create an infinite loop
            DelayCS 1                               ' Padding for 1 cycle
            If _USART4_wIndexIn <> _USART4_wIndexOut Then ' Is there any data in the buffer?
                Pop.d WREG2                         ' Yes. So restore WREG2 and WREG3
                GoTo __hrsin4__getbyte              ' Get the byte from USART4, and exit the routine from there
            EndIf
            Clear WREG0.Byte0                       ' \
            Dec WREG3.Byte0                         ' | Decrement the inner loop counter
            Subb.b WREG3H                           ' / So that it will trigger a Carry change
            If SRbits_C = 1 Then Continue           ' Continue if gone below zero?
            Dec WREG2.Byte0                         ' \ Decrement the outer loop counter
            Subb.b WREG2H                           ' / So that it will trigger a Carry change
            If SRbits_C = 0 Then                    ' Is the carry flag clear?
                Pop.d WREG2                         ' Yes. So restore WREG2 and WREG3
                Return                              ' Exit the routine
            EndIf
            WREG3 = cHrsin4_TimeoutPadding          ' Reload the timout padding into WREG3
        Wend                                        ' Look again
    #endIfSym
    '    
    '----------------------------------------------------------------------------     
    ' Hrsin replacement code without timeout
    ' Input     : None
    ' Output    : WREG0.Byte0
    ' Notes     : None
    '
    #ifSym __SYSCOM_HRSIN4_REQ_
    __hrsin4:
        Input __HRSIN4_PORT.__HRSIN4_PIN                ' Make the Hrsin1 pin an input (just in case it is altered elsewhere)
         'If USART4_tOverrun = 1 Then Clear USART4_tOverrun
         While _USART4_wIndexIn = _USART4_wIndexOut      ' Wait for data in the buffer
        Wend
    '
    ' Fall through __hrsin4__getbyte
    '
    #endIfSym    
    '----------------------------------- 
    ' Get a single byte from the buffer and place it into WREG0.Byte0
    ' 
    #ifSym __SYSCOM_HRSIN4_REQ_, __SYSCOM_HRSIN4_TO_REQ_ 
    __hrsin4__getbyte:
        WREG2.Byte0 = _USART4_bBuffer[_USART4_wIndexOut]    ' Place a buffer byte into WREG2.Byte0
        Inc _USART4_wIndexOut                               ' Move up the buffer
        If _USART4_wIndexOut > cUSART4_RXBufferSize Then     ' Is the out index overrunning the buffer size?
            Clear _USART4_wIndexOut                         ' Yes. So reset it
        EndIf 
        WREG0.Byte0 = WREG2.Byte0                           ' Transfer the byte from the buffer to WREG0
        Dec _USART4_Buffer_Count                            ' Dec our buffer counter
        Set SRbits_C                                        ' Set the carry flag to indicate byte received
        Return                                              ' Exit the routine
    #endIfSym
    '----------------------------------------------------------------------------
    _BufferedHrsin4_Main:
        USART4_Init()                                       ' Initialise the USART4 buffer interrupt
        
    $endif  ' _USART4_Buffer24_inc_
    Last edited by Jimbird; 12th November 2019 at 22:00.

  • Attention
    ×

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #3
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,426
    Thumbs Up
    Received: 296
    Given: 142
    Total Downloaded
    1.68 GB

    0 Not allowed!

    Default Re: PIC24FJ64GA306 Anomaly in USART 4

    I've examined the library code for USART4 with the PIC24FJ128GA306 and it is followiing the correct rules and using the correct SFRs etc... Matching the asm code on USART3 to USART4, they do exactly the same thing, but with a few differnt SFRs.

    Unfortunately, I don't have a device with 4 USARTs so I cannot test it physically.

  • Attention
    ×

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #4
    Senior Member GAMBOA's Avatar
    Join Date
    Nov 2004
    Posts
    422
    Thumbs Up
    Received: 19
    Given: 0
    Total Downloaded
    203.73 MB

    0 Not allowed!

    Default Re: PIC24FJ64GA306 Anomaly in USART 4

    Hi,

    Sorry for delay.

    @Les,
    Thank you for your time and interest.

    @Jimbird
    Thanks you for the example. I will study the code to see if I find the fault.

    At this time the prototypes are working with USART4 with the software Rsout command.
    Regards,
    Gamboa

  • Attention
    ×

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

       

    Similar Threads

    1. [SOLVED !] Anomaly for Les
      By Maxim in forum Proton 24
      Replies: 8
      Last Post: 11th November 2014, 10:17
    2. [USART] 2 usart at the same time.
      By GAMBOA in forum Proton Plus Compiler v3
      Replies: 2
      Last Post: 1st March 2014, 07:40
    3. [SOLVED !] Anomaly by using Strings!
      By Hans Chr in forum Proton Plus Compiler v3
      Replies: 1
      Last Post: 9th January 2010, 20:13
    4. [SOLVED !] Is this an anomaly?
      By joantabb in forum Proton Plus Compiler v3
      Replies: 9
      Last Post: 1st October 2005, 23:44

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts