PIC18F2450 Rs-232


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    I have an external 20mhz oscillator. Can you tell me what I need to do to use SEOUT2 and SERIN2 on pins PORTB.5 and PORTB.4?

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by PlantBob View Post
    I have an external 20mhz oscillator. Can you tell me what I need to do to use SEOUT2 and SERIN2 on pins PORTB.5 and PORTB.4?
    Hi Bob,

    Are you able to blink an led with the chip? It may sound stupid, but that eliminates a lot of other issues.

    With the 20 mhz external OSC and the default configs, your chip will run at 48 mhz. So if you are using the default configs, you will have to define your OSC. You might also try Darrel's All Digital. It takes care of some of the analog settings that can throw us for a loop. It is located here: http://www.picbasic.co.uk/forum/cont...54-All-Digital
    Im away from my PBP right now, but you should be able to use the PBP serout example from the manual.

    Let us know if you get stuck.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    You definitely do not want to enable the hardware USART if you want to use any bit-banged serial routines like SEROUT/SERIN or SEROUT2/SERIN2 on the hardware RX/TX pins.

    Enabling the hardware USART prevents you from using the TX/RX pins as digital, so bit-banged serial commands can't control these pins.

    And double-check your connections to the ST232. I suspect you have TX and RX backwards.
    Last edited by Bruce; - 3rd February 2011 at 21:57. Reason: ST232 Connections
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    And double-check your connections to the ST232. I suspect you have TX and RX backwards.
    he is using this board http://www.olimex.com/dev/pic-p28.html so wiring should be correct. (for the hardware serial port that is)

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Pin 17, TX on the PIC, should connect to pin 10 on the 232.
    Pin 18, RX on the PIC, should connect to pin 12 on the 232.

    Not the other way around like he states in his 1st post.
    Last edited by Bruce; - 4th February 2011 at 01:24.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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