Warning[202]


Closed Thread
Results 1 to 10 of 10

Thread: Warning[202]

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Location
    Vancouver, BC, Canada
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    i remember correctly in my program that i set the baud rate anywhere. I am using CDCDESC.ASM for virtual com port.
    I am using the orgional bootloader from Microchip.
    ________________
    KV

  2. #2
    Join Date
    Oct 2007
    Location
    Vancouver, BC, Canada
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    i am learning how to use Mister E piccal.

    thanks Darrel.
    ________________
    KV

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by KVLV View Post
    i am learning how to use Mister E piccal.
    That's the easy part.

    Start the program
    Click on EUSART calc
    Enter 48 in the OSC field
    Enter the baudrate in the appropriate place.

    Click the "Copy PBP DEFINE's to clipboard" button
    and paste them in your program.

    i remember correctly in my program that i set the baud rate anywhere.
    If you don't set the HSER DEFINE's in your program. PBP defaults to 2400 baud.

    If there is an HSEROUT or HSERIN anywhere in your program (even if it never gets executed), PBP will automatically initialize the USART at the default settings, which are too low for 48Mhz.
    <br>
    DT

  4. #4
    Join Date
    Oct 2007
    Location
    Vancouver, BC, Canada
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel.

    I searched through my program, there is a "Hserout" command, I commented it out and there is no further warning.

    I did copy
    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 46  ' 256000 Baud @ 48MHz, -0.27%
    SPBRGH = 0
    BAUDCTL.3 = 1         ' Enable 16 bit baudrate generator
    when compiled, i got warning message "error[113] \pbp\pbpic18.lib 580 : symbol not previously define(baudctl)

    But anyway I don't need the those DEFINE lines above so I just commented out, and there is no warning. The program when loaded to the pic work fine.
    ________________
    KV

  5. #5
    Join Date
    Oct 2007
    Location
    Vancouver, BC, Canada
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    I use USB on board of the pic for transmitting/receiving data.
    ________________
    KV

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    There are 2 possible places for the BRG16 bit.

    BAUDCON.3
    - or -
    BAUDCTL.3

    It depends on the chip. And for a 4550 it's BAUDCON.3

    mister_e's calculator has a drop-down box for that.
    But you have to know which one to use.


    But like you said, it's fixed.
    <br>
    DT

  7. #7
    Join Date
    Oct 2007
    Location
    Vancouver, BC, Canada
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    indeed, substitue BAUDCTL.3 = 1 with BAUDCON.3 = 1, when compile produced no error.
    ________________
    KV

Similar Threads

  1. Warning[202]
    By Del Tapparo in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th October 2008, 18:41

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