Serout2 Issues 18f258 Vs. 18f2585


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Posts
    2

    Question Serout2 Issues 18f258 Vs. 18f2585

    I'm having trouble using the SEROUT2 command with some of the newer PIC parts. I've compiled and programmed the following code onto both the 18F258 and the 18F2585. Everything works as expected for the 18F258 but the SEROUT2 command doesn't seem to do anything for the 18F2585. Probing with an oscilloscope shows no activity at the pin. I've had similar problems using the SEROUT2 command with other newer parts including the 18F2525,18F2550.

    DEFINE OSC 20

    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 24h
    DEFINE HSER_BAUD 19200

    TRISC = %10000000

    LED0 VAR PORTC.4
    LED1 VAR PORTC.5

    LED0 = 0
    LED1 = 0

    LOOP:

    HSEROUT [254,84,254,88]
    SEROUT2 PORTC.0,32,[254,84,254,88]
    LED0 = 1
    LED1 = 0
    PAUSE 500

    HSEROUT [254,72,"HARDWARE SERIAL OUT"]
    SEROUT2 PORTC.0,32,[254,72,"SOFTWARE SERIAL OUT"]
    LED0 = 0
    LED1 = 1
    PAUSE 500

    GOTO LOOP

    END

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    look at the table bellow.. it's all black on white


    unless you have modified the T1CON register badly somewhere, my guess will be
    Code:
    Serout LATC.0,32,plahplahplah
    Attached Images Attached Images  
    Last edited by mister_e; - 29th June 2006 at 00:13.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jun 2006
    Posts
    2

    Smile

    I think I figured it out. After playing around with all the available configuration bits it appears that you must disable the extended cpu option. Some programmers dont give you the option to change all the configuration bits after compiling so it can be difficult to make these changes unless you know how to modify the appropriate *.ini file.

Similar Threads

  1. Serout and 18F87J50
    By Glenn_Webber in forum Serial
    Replies: 8
    Last Post: - 20th November 2009, 14:26
  2. Serout to serial servo
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 12th August 2009, 16:46
  3. SLOW Serin2 and Serout2
    By dragons_fire in forum General
    Replies: 3
    Last Post: - 26th June 2009, 02:38
  4. Gps with 16f628
    By dragons_fire in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 8th June 2006, 03:38
  5. TMR1 interrupt question
    By ronjodu in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 15th February 2006, 03:02

Members who have read this thread : 2

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