[SOLVED !] PIC16F18877 - problem with serial out - HRSOut


Today 01:28
Forum: Proton Plus Compiler v3
Starter: BenBarber
Views: 4587
Replies: 43
Go to last post By: david
Yesterday 23:42
Forum: Proton 24
Starter: hadv215
Views: 0
Replies: 8
Go to last post By: shantanu@india
Yesterday 14:45
Forum: The Lounge
Starter: Tim
Views: 0
Replies: 17
Yesterday 14:03
Forum: USB
Starter: towlerg
Views: 0
Replies: 5
Yesterday 11:10
Forum: Proton Studio
Starter: johngb
Views: 0
Replies: 3
Yesterday 07:48
Forum: Proton 24
Starter: craig
Views: 0
Replies: 2
Yesterday 07:10
Forum: The Lounge
Starter: shantanu@india
Views: 0
Replies: 25
Closed Thread
Results 1 to 5 of 5
  1. #1
    Junior Member kuhrig's Avatar
    Join Date
    Aug 2005
    Posts
    87
    Thumbs Up
    Received: 4
    Given: 0
    Total Downloaded
    3.38 GB

    0 Not allowed!

    Default PIC16F18877 - problem with serial out - HRSOut

    I'm trying to use the HRSOut command with a PIC16F18877.
    With HRSOut in the code as soon as it reaches the command it is stuck until reset by watchdog. No serial out.
    Removing the command it's working OK (LED flash timing correct).
    With a different branded compiler and equal commands the serial out is working fine.
    Any thoughts?

    Code:
        Device = 16F18877
    
        Declare Reminders Off
        @ CONFIG_REQ = 0 ; Override Compiler's configuration settings
        Asm-
            __Config _Config1, 0x179F ;FEXTOSC_ECH & RSTOSC_HFINTPLL & CLKOUTEN_OFF & CSWEN_OFF & FCMEN_OFF
            __Config _Config2, 0x3FFE ;MCLRE_OFF & PWRTE_OFF & LPBOREN_OFF & BOREN_ON & BORV_LO & ZCD_OFF & ZCDDIS_OFF & PPS1WAY_ON & STVREN_ON & DEBUG_OFF
            __Config _Config3, 0x07FF ;WDTCPS_WDTCPS_31 & WDTE_ON & WDTCWS_WDTCWS_7 & WDTCCS_LFINTOSC
            __Config _Config4, 0x0FFF ;WRT_OFF & SCANE_not_available & LVP_OFF
            __Config _Config5, 0x3FFF ;CP_OFF & CPD_OFF
        Endasm-
        Declare Reminders On
    
    ;**** End of Fuse Configurator Settings ****
    ;-------------------------------------------------------------------------------
        Declare Xtal = 16
    
        OSCCON1 = %0010001      '  HFINTOSC WITH 2x PLL /  CLOCK DIVIDER 2
        OSCCON2 = %0010001      '  HFINTOSC WITH 2x PLL /  CLOCK DIVIDER 2
    
        OSCFRQ = %00000011      ' SET AT 8 MHZ
    
    Declare Watchdog = On
    
    ;Calculated Baudrate = 9615 @ Xtal 8MHz, sERROR = 0,16%
        Declare Hserial_RCSTA = 144 ; Enable continuous receive
        Declare Hserial_TXSTA = 36  ; Enable transmit, BRGH = 0
        Declare Hserial_SPBRG = 129  ; Baud Rate Generator Value
        Declare Hserial_Clear = On  ; Clear overflow automatically
    
        Symbol LED_SOLAR        LATE.1
    
        TRISA = 0x00
        TRISB = 0x00
        TRISC = 0x00
        TRISE = 0x00
        ANSELA = 0x00
        ANSELB = 0x00
        ANSELC = 0x00
        ANSELE = 0x00
    
        Clear
        DelayMS 500
    
        RC6PPS = 0x10   '%10000      ' ASSIGN RC6 TO TX
    
        TEST:
        Toggle LED_SOLAR
        HRSOut "TEST",13,10
        DelayMS 500
        GoTo TEST
    
        End

  2. 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. #2
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,982
    Thumbs Up
    Received: 183
    Given: 168
    Total Downloaded
    3.60 GB

    0 Not allowed!

    Default Re: PIC16F18877 - problem with serial out - HRSOut

    You've set OSCFRQ for 8Mhz but you've declared XTAL as 16.
    George.

  4. 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. #3
    Junior Member kuhrig's Avatar
    Join Date
    Aug 2005
    Posts
    87
    Thumbs Up
    Received: 4
    Given: 0
    Total Downloaded
    3.38 GB

    0 Not allowed!

    Default Re: PIC16F18877 - problem with serial out - HRSOut

    Hi George,
    setting xtal = 8 according to OSFRQ setting, does not change the HRSOut problem.
    With xtal = 8, delay timing is not correct. That is another problem.

  6. 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. #4
    Prolific Poster charliecoultas's Avatar
    Join Date
    Sep 2010
    Posts
    1,279
    Thumbs Up
    Received: 77
    Given: 39
    Total Downloaded
    3.21 GB

    0 Not allowed!

    Default Re: PIC16F18877 - problem with serial out - HRSOut

    What is the version number of the compiler you are using?

  8. 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. #5
    Junior Member kuhrig's Avatar
    Join Date
    Aug 2005
    Posts
    87
    Thumbs Up
    Received: 4
    Given: 0
    Total Downloaded
    3.38 GB

    0 Not allowed!

    Default Re: PIC16F18877 - problem with serial out - HRSOut

    compiler: 3.7.0.6

    SOLVED now:

    Found PIR1 register for hrsout1 instead of PIR3 in ASM file. No idea where the compiler found PIR1.
    Uninstalled Proton suite completely incl. all updates. Deleted program folder.
    Re-installed. Compiled. Working. - Now PIR3 register in asm file.
    Thanks for your support.

  10. 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 2 users browsing this thread. (0 members and 2 guests)

     

Similar Threads

  1. syntaxis problem with HRSout and AT commands SIM900
    By pe1pme in forum Absolute Beginners Section
    Replies: 6
    Last Post: 24th August 2015, 04:07
  2. Problem with HRSOut
    By SimonJA in forum Proton 24
    Replies: 8
    Last Post: 17th December 2014, 12:10
  3. HRSOUT problem...
    By skerrin in forum The Lounge
    Replies: 3
    Last Post: 29th May 2010, 16:25
  4. HRSOUT & Crownhill Serial LCD
    By Cruster in forum The Lounge
    Replies: 16
    Last Post: 22nd March 2008, 16:50

Members who have read this thread since 22nd March 2019, 22:39 : 0

Actions :  (Set Date)  (Clear Date)

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

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