Ascii debug issues?


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    achilles03's Avatar
    achilles03 Guest

    Default Ascii debug issues?

    I had a program that communicated via RS232 to my PC pretty well, but I lost it in a hard drive transfer and can't get a new program to work exactly right.

    The program I have has the following serout2 command repeated in a loop:

    serout2 portb.2,396,["TACOS"]

    On my terminal program, all I get is something like:
    "aeU aeU aeU aeU aeU"

    (the a is actually a Greek alpha)

    I've also tried (with somewhat similar results as above):
    serout2 portb.2,396,[DEC 84,65,67,79,115,33,13]

    I have the terminal program set to recieve at 2400, true, non-inverted, 8-bit and 1 stop bit. What am I missing?

    Thanks in advance for any help!
    Dave

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    what about the osc speed? if different than 4MHZ, did you use the DEFINE OSC ???
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    achilles03's Avatar
    achilles03 Guest


    Did you find this post helpful? Yes | No

    Default

    Yeah, I set it to 4Mhz.

  4. #4
    Join Date
    Sep 2005
    Location
    Dayton, Ohio
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    I am suffering a similar problem here with a PIC18F2525. I know the MAX232 interface is fine, as it works perfect for bootloading. And I can get HSEROUT to work fine, but when I try to use SEROUT I get wierd characters on hyperterminal.

    I am runnig at 8MHz with a ceramic resonator (yes I use DEFINE OSC 8) and using 9600 baud.

    I'm wondering if it's a timing issue with software vs hardware generated serial data. I still need to try generating from other pins. Possible that the USART is still doing something to the TX pin due to the bootloader having configured it. Still troubleshooting ....
    Jim Robertson
    "MilesTag" DIY Lasertag
    www.lasertagparts.com/mtdesign.htm
    Dayton, Ohio

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Are you using TRUE mode with SEROUT?

    Going through the MAX232 you'll need to use TRUE mode. With a direct connection to the PC, you would use inverted.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    In addition to Bruce, what about the config fuses? HS OSC or XT OSC???
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. N-Bit_MATH
    By Darrel Taylor in forum Code Examples
    Replies: 38
    Last Post: - 16th December 2010, 14:48
  2. About USB
    By dias11 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd December 2009, 20:41
  3. Understanding timer issues
    By boroko in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th April 2009, 02:56
  4. debug not working with MPASM assempler
    By santamaria in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th March 2009, 07:51
  5. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46

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