DEFINE HSER_CLROERR 1 ; how do I work? am I taxing performance heavily?


Closed Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    DFW area of Texas
    Posts
    24

    Default DEFINE HSER_CLROERR 1 ; how do I work? am I taxing performance heavily?

    How does DEFINE HSER_CLROERR 1 work?
    Does it turn on interrupts and toggle CREN & SPEN when the recieve buffer interrupt is thrown?
    or simply toggle CREN & SPEN bits whenever anything hits the receive buffer(OERR bit? or RCIF transfer bit?) ?
    ...
    also, is there anyway for me to see what 'DEFINES' are coded to do?

    thanks in advance!
    -ray
    "Imagination is more important than knowledge", Albert.E.

  2. #2
    Join Date
    Nov 2009
    Location
    DFW area of Texas
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Re: DEFINE HSER_CLROERR 1 ; how do I work? am I taxing performance heavily?

    Ahh, I figured out that the .lib files in pic basic pro folders contain the secrets of DEFINES!!!
    This DEFINE does this..
    HSERIN
    ifdef HSER_CLROERR
    btfsc RCSTA, OERR ; Check for overflow error
    bcf RCSTA, CREN ; Toggle continuous receive to clear error
    bsf RCSTA, CREN
    endif
    for every HSERIN used in code...(I had a manual implementation of this..but your DEFINE seems to work just fine also)

    also....there is this that the DEFINE is doing:
    ifdef HSER_CLROERR
    btfsc RCSTA, OERR ; Check for overflow error
    bcf RCSTA, CREN ; Toggle continuous receive to clear error
    bsf RCSTA, CREN
    endif
    ..
    thanks ray,
    you r welcome ray!
    It's ok to talk to myself as long as I don't talk back! (Quote from Fred Sanford, 'Sanford and Son' show)
    -ray
    "Imagination is more important than knowledge", Albert.E.

Similar Threads

  1. OT - Firefox browser - faster performance
    By malc-c in forum Off Topic
    Replies: 2
    Last Post: - 14th August 2006, 10:33
  2. OT - Firefox browser - faster performance
    By malc-c in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd June 2006, 03:40
  3. Replies: 0
    Last Post: - 25th May 2005, 10:35
  4. define lcd
    By chip_1 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th May 2005, 17:52
  5. @ Define
    By Dwayne in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th June 2004, 16:01

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