PIC18F4550 to 18F4553 Comm Issue?


Results 1 to 19 of 19

Threaded View

  1. #14
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: PIC18F4550 to 18F4553 Comm Issue?

    Code:
    ' 184550 external oscillator 20MHz
    ...
    DEFINE OSC 48
    ...
    DEFINE HSER_RCSTA 90h               ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 20h               ' Enable transmit, BRGH = 0
    DEFINE HSER_CLROERR 1               ' Clear overflow automatically
    DEFINE HSER_SPBRG 25                ' 115200 Baud @ 48MHz, 0,16%
    SPBRGH = 0
    BAUDCON.3 = 1                       ' Enable 16 bit baudrate generator
    I should have included the CONFIGs though, they are still in PBP v2.60c format but the settings are easily convertible:
    Code:
    @   __CONFIG    _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
    @   __CONFIG    _CONFIG1H, _FOSC_HSPLL_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
    @   __CONFIG    _CONFIG2L, _PWRT_OFF_2L & _BOR_ON_2L & _BORV_1_2L & _VREGEN_ON_2L
    @   __CONFIG    _CONFIG2H, _WDT_OFF_2H
    @   __CONFIG    _CONFIG3H, _CCP2MX_OFF_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H
    @   __CONFIG    _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L
    But Richard is a senior member for a reason.

    Robert
    Last edited by Demon; - 15th April 2016 at 02:16.

Similar Threads

  1. RS232 comm
    By longdw in forum Serial
    Replies: 9
    Last Post: - 15th September 2009, 04:13
  2. trade 18F4553-I/P (really want 16c717/JW)
    By nomad in forum Adverts
    Replies: 2
    Last Post: - 1st November 2008, 23:49
  3. Code Issue - select case or 'if' issue - not sure why
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th October 2007, 09:52
  4. serial comm problem
    By win_832001 in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 29th June 2006, 14:57
  5. Serial comm Problems
    By Fossil in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th January 2004, 03:29

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