dsPic33FJ128GP802 Rx on portb.11


+ Reply to Thread
Results 1 to 9 of 9

Thread: dsPic33FJ128GP802 Rx on portb.11736 days old

  1. #1
    Member basparky's Avatar
    Join Date
    Oct 2006
    Posts
    216
    Thumbs Up
    Received: 9
    Given: 17
    Total Downloaded
    751.86 MB

    0 Not allowed!

    Default dsPic33FJ128GP802 Rx on portb.11

    Hi all,

    For a project i'am trying to get 2 USARTS working. Somehow i cannot get U1Rx working by the following config (U1Tx does work as expected):
    Code:
    Proc InitUart()
    
    ;PMD1 = 0
    ;PMD2 = 0
    
    
    U1MODEbits_UARTEN = 0 'Disable Rx1 en Tx1
    ; Poort #1 lezen en zenden joystick
    Declare Hserial1_Baud = 19200
    Declare Hrsout1_Pin = PORTB.10                   ' Select which pin is to be used for TX with USART1
    Declare Hrsin1_Pin = PORTB.11                   ' Select which pin is to be used for RX with USART1
    PPS_Input(cOUt_pin_Rp11, cIn_Fn_U1RX)            ' Make Pin RB11 U1RX    
    PPS_Output(cOut_Pin_Rp10, cOut_Fn_U1TX)          ' Make Pin RB10 U1TX
    ;ontvangen
    U1MODEbits_URXINV = 1                                     'Rx inverse when connected to bus.
    
    
    ;zenden
    ;nodig als aan bus gekoppeld en verzend naar joystick
    ;U1MODE.1 = 1    ; parity even
    ;U1MODE.2 = 0
    ;U1STA.14 = 1    ; Tx inverse
    
    
    U2MODEbits_UARTEN = 0 'Disable Rx1 en Tx1
    ; Poort #2 lezen en zenden controller
    Declare Hserial2_Baud = 19200
    Declare Hrsout2_Pin = PORTB.1                   ' Select which pin is to be used for TX with USART1
    Declare Hrsin2_Pin = PORTB.0                    ' Select which pin is to be used for RX with USART1
    PPS_Input(cOUt_pin_Rp0, cIn_Fn_U2RX)            ' Rb0 = U2Rx
    PPS_Output(cOut_Pin_Rp1, cOut_Fn_U2TX)
    ;ontvangen
    U2MODEbits_URXINV = 1                                     'Rx inverse when connected to bus.
    
    
    ;zenden
    ;nodig als aan bus gekoppeld en verzend naar joystick
    ;U2MODE.1 = 1    ; parity even
    ;U2MODE.2 = 0
    ;U2STA.14 = 1    ; Tx inverse
    
    
    PMD1.5 = 0     ; page 156 datasheet, enable UART 1,2 modules
    PMD1.6 = 0
    ; Enable Rx en Tx
    U1MODEbits_UARTEN = 1 'Enable Rx1 en Tx1
    U2MODEbits_UARTEN = 1 'Enable Rx2 en Tx2
    U1STAbits_UTXEN = 1
    U2STAbits_UTXEN = 1
    
    
    
    
    IEC0bits_U1RXIE = 0
    
    
    EndProc
    If i switch U1Rx with U2Rx i get the expected result by using Hserin1.

    Currently it is driving me crazy Does anyone is seeing something wrong here? Any suggestions?

    Thanks in advance

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
    Member basparky's Avatar
    Join Date
    Oct 2006
    Posts
    216
    Thumbs Up
    Received: 9
    Given: 17
    Total Downloaded
    751.86 MB

    1 Not allowed!

    Default Re: dsPic33FJ128GP802 Rx on portb.11

    Solved!
    This: PPS_Input(cOUt_pin_Rp0, cIn_Fn_U2RX) Needs to be PPS_Input(cIn_pin_Rp0, cIn_Fn_U2RX)!!!

  • 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
    Prolific Poster normnet's Avatar
    Join Date
    Jul 2004
    Posts
    2,361
    Thumbs Up
    Received: 78
    Given: 44
    Total Downloaded
    1.39 GB

    0 Not allowed!

    Default Re: dsPic33FJ128GP802 Rx on portb.11

    Quote Originally Posted by basparky View Post
    Solved!
    This: PPS_Input(cOUt_pin_Rp0, cIn_Fn_U2RX) Needs to be PPS_Input(cIn_pin_Rp0, cIn_Fn_U2RX)!!!
    Good find.

  • 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
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,157
    Thumbs Up
    Received: 95
    Given: 1
    Total Downloaded
    2.67 GB

    0 Not allowed!

    Default Re: dsPic33FJ128GP802 Rx on portb.11

    If you had used the Peripheral Pin Select plugin you would have got it right first time.
    It gets its information from the.def files. I have just checked it and they are correct for this device.
    JohnB

  • 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.

  • #5
    Member basparky's Avatar
    Join Date
    Oct 2006
    Posts
    216
    Thumbs Up
    Received: 9
    Given: 17
    Total Downloaded
    751.86 MB

    0 Not allowed!

    Default Re: dsPic33FJ128GP802 Rx on portb.11

    Quote Originally Posted by johngb View Post
    If you had used the Peripheral Pin Select plugin you would have got it right first time.
    It gets its information from the.def files. I have just checked it and they are correct for this device.
    Downloaded and installed! Thanks!!

  • 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.

  • #6
    JimDrew
    Guest JimDrew's Avatar

    0 Not allowed!

    Default Re: dsPic33FJ128GP802 Rx on portb.11

    John, I downloaded and installed your plugin - but I don't see a way to use it? I don't see anything different in Proton24.

  • 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.

  • #7
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,157
    Thumbs Up
    Received: 95
    Given: 1
    Total Downloaded
    2.67 GB

    0 Not allowed!

    Default Re: dsPic33FJ128GP802 Rx on portb.11

    if you have installed it correctly you should see a list of plugins.
    Choose View, Plugin, JGB Tools, and you should see the peripheral Pin Select wizard

    Set the device in you active page to 33FJ128GP802 and run the PPS wizard. It will populate with the options and you can make your selection.
    JohnB

  • 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.

  • #8
    JimDrew
    Guest JimDrew's Avatar

    0 Not allowed!

    Default Re: dsPic33FJ128GP802 Rx on portb.11

    Got it, thanks! I didn't realize the plugins were available from the view menu. There are quite a few that are not on the toolbar.

  • 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.

  • #9
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,157
    Thumbs Up
    Received: 95
    Given: 1
    Total Downloaded
    2.67 GB

    0 Not allowed!

    Default Re: dsPic33FJ128GP802 Rx on portb.11

    Its just not practical to put all plugins on the toolbar.

    You could choose to add it to the toolbar by running the Plugin Editor and navigating to the file you want. Under the Plug Name box click on the down-arrow on the rh side and check Speed Button Visible. Save the changes and you'll find the plugin appear in the toolbar.
    JohnB

  • 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. DAC on dsPIC33FJ128GP802
      By charliecoultas in forum Proton 24
      Replies: 31
      Last Post: 2nd July 2016, 00:48
    2. [SOLVED !] PWM and portB
      By wilfrieds in forum Proton Plus Compiler v3
      Replies: 6
      Last Post: 7th November 2011, 08:44
    3. PORTB not behaving
      By [email protected] in forum Proton Plus Compiler v3
      Replies: 17
      Last Post: 27th October 2009, 09:23
    4. [SOLVED !] LCD on portb
      By savnik in forum Proton Plus Compiler v3
      Replies: 12
      Last Post: 14th February 2009, 01:08
    5. Confused about portb
      By David Blackburn in forum Proton Plus Compiler v3
      Replies: 6
      Last Post: 3rd June 2005, 20:50

    Tags for this Thread

    Posting Permissions

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