serial communication problem


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Try these settings
    Code:
    RCSTA = $90   ' Enable serial port & continuous receive
    TXSTA = $20   ' Enable transmit, BRGH = 0
    SPBRG = 25    ' 9600 Baud @ 0.16%
    SPBRGH = 0
    BAUDCON.3 = 1 ' Enable 16 bit baudrate generator
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825

    Default

    Since your temperature will never be higher then 255 °C (I assume) then set your variable "temp" as a byte not word.

    temp var byte

    because serially you cannot Tx word but only byte.

    Al.
    All progress began with an idea

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

    Default

    Quote Originally Posted by aratti View Post
    Since your temperature will never be higher then 255 °C (I assume) then set your variable "temp" as a byte not word.

    temp var byte

    because serially you cannot Tx word but only byte.

    Al.
    Hi Al, Can he not send a word out as 2 bytes, like so . . .
    Hserout [Temp.HighByte, Temp.LowByte,10] ?
    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.

  4. #4
    Join Date
    May 2008
    Location
    Italy
    Posts
    825

    Default

    Hi Joe, Yes he can. But he would not be able to recombine them back to a word, using hyperterminal.

    Al.
    All progress began with an idea

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

    Default

    Quote Originally Posted by aratti View Post
    Hi Joe, Yes he can. But he would not be able to recombine them back to a word, using hyperterminal.

    Al.
    OK I buy that, I really asked the question so as to get your answer, so when someone wanders into this thread looking for answers, they understand it this way.
    Thanks Al
    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.

Similar Threads

  1. Replies: 18
    Last Post: - 4th July 2017, 14:26
  2. Replies: 5
    Last Post: - 20th March 2006, 01:34
  3. Serial Communication Problem
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 23rd February 2006, 02:11
  4. Problem in Serial Communication
    By uuq1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th June 2005, 07:17
  5. Replies: 8
    Last Post: - 11th November 2004, 20:08

Members who have read this thread : 1

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