Serout2 pic18f2620


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2005
    Posts
    4

    Wink Serout2 pic18f2620

    The ask help, The don'ts know very the English. Use MPLAB IDE v7.50 PBP2.46
    __CONFIG _CONFIG1H, _OSC_HS_1H
    __CONFIG _CONFIG2L, _BOREN_OFF_2L
    __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
    __CONFIG _CONFIG3H, _MCLRE_ON_3H & _PBADEN_OFF_3H
    __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    Programma:…
    Start:
    Temp=23
    ' hserout["123 ",13,10]
    TimeOut=1000
    serout2 PORTA.0,194,["123 ",dec Temp,10,13]
    High RST
    Low ON_OFF
    Low LEDV
    For Temp=0 TO 10
    Toggle LEDV
    Pause 0500
    Next Temp
    goto start
    end
    These macaws the dates seriali: <0>L™3 23
    Oppure: serout2 PORTA.0,194,["1234567 ",dec Temp,10,13]
    The visualize: <0>L™34567 23
    Oppure: serout2 PORTA.0,194,[ dec Temp,10,13]
    The visualize: <0>¦&¡C
    The led works well. If I use HSEROUT the circuit she works well, but The cannots use him it. Thanks to everybody.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cerio View Post
    ' hserout["123 ",13,10]

    serout2 PORTA.0,194,["123 ",dec Temp,10,13]
    I don't think your 'SEROUT2' mode value is set correctly. You have the SEROUT2 command set up for 4,673 baud, driven output, no inversion, no parity.
    Check the PBP manual (Section 5.74 and Appendix A) for the correct method to determine the value required for your baud rate.
    If you still can't get it work, let us know...

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


    Did you find this post helpful? Yes | No

    Default

    PORTA.0 is analog, you MUST disable the multiplexed analog stuff on it.

    Code:
    ADCON1=$0F
    CMCON = 7
    HSEROUT will work as long you have properly set the related DEFINEs + DEFINE OSC. HSEROUT defaults is 2400Baud @ 4MHz.

    http://www.mister-e.org/pages/utilitiespag.html
    Steve

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

  4. #4
    Join Date
    Mar 2005
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    For skimask if I use 188 (4800N8) The visualize: < 0 > L. & MM. D. & C
    Problem resolved by Mister e.
    Code.....

    OSCCON=%01100000 '= > set internal osc to 4MHZ
    ADCON1=$0F 'PORTA.0 is analog, you MUST disable the multiplexed analog stuff on it.
    CMCON = 7..

    serout2 PORTA.0,188, ["1234567 ", dec Temp,10,13]
    I correctly visualize: 1234567 23
    Thanks of heart for the help

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cerio View Post
    For skimask if I use 188 (4800N8) The visualize: < 0 > L. & MM. D. & C

    serout2 PORTA.0,188, ["1234567 ", dec Temp,10,13]
    I correctly visualize: 1234567 23
    Thanks of heart for the help
    I mentioned that because you had 194 as your mode in the SerOut2 in post #1, which would indicate to me that your oscillator is running fast. You might want to tweak your OSCTUN, if your PIC is so equipped (but we don't know that since you didn't include that info).

Similar Threads

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

Members who have read this thread : 1

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