HSEROUT & Sleep Question


Closed Thread
Results 1 to 4 of 4

Hybrid View

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

    Default Re: HSEROUT & Sleep Question

    You need to wait until the USART has finished sending all the bits before going to sleep.

    The TRMT bit (TXSTA.1) reads 0 (TSR full) while the USART is still shifting out data.
    Wait for it to go to 1 (TSR empty) before going back to sleep.

    Code:
    TRMT   VAR TXSTA.1
    
    HSEROUT ["Hello World!"]
    WHILE NOT TRMT : WEND
    @ SLEEP
    DT

  2. #2
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    169

    Default Re: HSEROUT & Sleep Question

    Thanks Darren!

    Cheers,

    Troy

  3. #3
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    169

    Default Re: HSEROUT & Sleep Question

    Thanks Darrel! (not Darren) [whacking forehead]

    Troy

Similar Threads

  1. Replies: 0
    Last Post: - 26th June 2010, 17:52
  2. Hserin & Hserout - Trying to blink an LED
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th May 2010, 12:25
  3. Sleep & nap
    By keymuu in forum mel PIC BASIC Pro
    Replies: 24
    Last Post: - 4th December 2008, 18:45
  4. Replies: 5
    Last Post: - 5th February 2006, 16:51
  5. interupt & Sleep Problem - HELP!!
    By Santana in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd November 2004, 10:39

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