Serial Timeout Strange Issues


Results 1 to 21 of 21

Threaded View

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

    Default Re: Serial Timeout Strange Issues

    Hi Corbet, have you tried changing your byte values to word, just to see if you are overloading your bytes as Dave suggested ?
    You could make redundant variables and store your current var value as a backup and then compare your new values to them and if out of range then restore from them. Something like:
    psuedocode
    Code:
    serin . . . t1pulse
    dummy1 = t1pulse 
    pulseout . . . t1pulse
    serin . . . t1pulse
    if t1pulse >255 then t1pulse = dummy1 ' restore previous value
    pulseout . . .
    If time critical serial is too slow then you should switch to HSERIN which will receive via hardware while loop does it's thing.
    A nice buffer is featured in the Article about "Serial Backpack LCDs" This Thread was promoted to an article based upon one my early posts seeking help to make a serial LCD as I am TOO CHEAP to lay out 35 to 50 bucks a pop for them.
    You could also Increase your clock speed to 20mhz and increase the baud rate WAY UP so as to execute the loops faster. It uses a little more power though. Bit Bang serial is a Time Hog, of them Debug seems the fastest, uses serout2 syntax too.
    Last edited by Archangel; - 15th June 2011 at 03:53. Reason: [code] this is how to use code tags [/code]
    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.

Members who have read this thread : 1

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