serin/hserin fail when i break the standard...


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Try adding this after the HSERIN
    Code:
    RCSTA.4 = 0 : RCSTA.4 = 1
    Dave
    Always wear safety glasses while programming.

  2. #2


    Did you find this post helpful? Yes | No

    Default

    actually i think i have found an answer, may not be right one, gonna do some testing, but will try that too.

    one thing i can say, it works with 3v serial, infact i'm at about 2.8v, and its stable.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Code:
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    DEFINE HSER_SPBRG 225 ' 9600 Baud @ 48MHz, 0,0%
    SPBRGH = 4
    BAUDCON.3 = 1 ' Enable 16 bit baudrate generator

    the above lines cured all my serial in problems.

    I think the last 3 were the important bits, but now when the buffer fills it just ignores extra chars etc, no more ''going deaf''

    using them with

    Code:
            __CONFIG    _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
            __CONFIG    _CONFIG1H, _FOSC_HSPLL_HS_1H
            __CONFIG    _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
            __CONFIG    _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_ON_3H
            __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    And a 20mhz crystal gives trouble free operation to the phone/module, and no issue with the 3v signals.

    I had to remove the resistor/led combination from the rx pin, it was loading the module a little and dropping its voltage down too low to be seen by the pic, but with a direct connection transfers have been error free. (measured on voltmeter as 2.8v, 2.75 and bits go missing...)


    Thanks to everyone for there input and ideas, I dont know where I would have been without you all this last few weeks!

Members who have read this thread : 0

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