SERIN2 = ok, HSERIN = no!


Closed Thread
Results 1 to 29 of 29

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: SERIN2 = ok, HSERIN = no!

    Quote Originally Posted by flotulopex View Post
    Yup! Adding "DEFINE HSER_CLROERR 1" has solved the "hanging" problem.

    As I previously set the RCSTA.1 = 1, I wrongly thought this would handle the automatic overrun. I should have noticed the "Read-Only" flag on this bit in the datasheet.

    BTW, what exactly does "DEFINE HSER_CLROERR" 1 do? Where can I find information about what other DEFINE commands do?

    NB: my apologise Demon; I missed your advice for a pull-up in an early post

    Final working code is Attachment 6366
    From the book "As the hardware buffer only has 2 byte input buffer, it can easily overflow if charactors are not read from it often enough. When this happens, the USART stops accepting new characters and needs to be reset. This error can be reset by toggling the CREN bit in the RCSTA register. A DEFINE can be used to automatically clear this error. However you will not know that an error has occured and characters may have been lost."
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,161


    Did you find this post helpful? Yes | No

    Default Re: SERIN2 = ok, HSERIN = no!

    Quote Originally Posted by Archangel View Post
    ...However you will not know that an error has occured and characters may have been lost.

    Ah, and this must be where a checksum comes it to play?

    Robert

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