Simple code but strange result - 877A


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Simple code but strange result - 877A

    Do you have a schematic? What's RC.6 connected to?

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Simple code but strange result - 877A

    Quote Originally Posted by scalerobotics View Post
    Do you have a schematic? What's RC.6 connected to?
    rc.6 ->Pin11 (MAX232) -> Pin14(MAX232) -> Modem Pin3 (Female RS232)
    ___________________
    WHY things get boring when they work just fine?

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


    Did you find this post helpful? Yes | No

    Default Re: Simple code but strange result - 877A

    Hi,
    I have NEVER used the USART to transmit so if I am wrong, . . . well here is my try . . .
    TXSTA.5 = 1 'which is transmit enable bit.
    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


    Did you find this post helpful? Yes | No

    Unhappy Re: Simple code but strange result - 877A

    Quote Originally Posted by Joe S. View Post
    Hi,
    I have NEVER used the USART to transmit so if I am wrong, . . . well here is my try . . .
    TXSTA.5 = 1 'which is transmit enable bit.
    Didn't Work
    ___________________
    WHY things get boring when they work just fine?

  5. #5
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Simple code but strange result - 877A

    this is from the datasheet
    Bit SPEN (RCSTA<7>) and bits TRISC<7:6> have to be
    set in order to configure pins RC6/TX/CK and RC7/RX/DT
    as the Universal Synchronous Asynchronous Receiver

    Transmitter.


    So maybe you need to set trisc.6=1 also?
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: Simple code but strange result - 877A

    Quote Originally Posted by cncmachineguy View Post
    this is from the datasheet


    So maybe you need to set trisc.6=1 also?
    Thanks for the reply. Tried the above - NO Luck
    ___________________
    WHY things get boring when they work just fine?

  7. #7
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Simple code but strange result - 877A

    OK, Just a Doh check for me, but I assume you DO have some kind of osc hooked up? xtal,resonator, something?
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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


    Did you find this post helpful? Yes | No

    Default Re: Simple code but strange result - 877A

    Maybe the extra space between the T and the [ is messing things up?
    Code:
    HSEROUT  ["AT",10,13]
    If that is not the problem then double check the speed of your OSC. Receiving works, yes. But receiving is more tolerant than sending.. At least it seems that way. Are you using a crystal with caps or a resonator?
    Dave
    Always wear safety glasses while programming.

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