Serial comunication problem


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Sep 2011
    Posts
    20

    Default Serial comunication problem

    Hi,

    I have a very silly problem with a my very simply
    prog in PBP.

    I got a easy circuit with a 16f676 PIC and a IC Maxim 232
    all fitted on a breadboard, where I simply send data(string, variables, ecc)
    to COM1: on my PC, with Debug instruction at 2400B and using Hyperterminal
    on Win-XP.

    The problem is the I get back just a lot of garbage on my
    screen(unreadable chars) and I can't visualizy any ASCII
    code!

    I have checked a very lot of times my circuit, changed
    the IC, verified the voltage, the pins on RS-232, change
    the serial port, the prog in PBP, but it seems is correctly
    and all is too simply to be wrong.
    I have checked with a LCD if PIC/Prog work and yes it's
    work perfectly, but I can't send anything on my PC's
    serial port.

    Maybe I need to set the RS-232 DTR, DCD, ecc in anyway ?

    So please help my to solve it because I think to forget
    to do some elementar thing.

    Thanks in adavance.

    PS:
    Forget my english.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,531


    Did you find this post helpful? Yes | No

    Default Re: Serial comunication problem

    Hi,
    Have you tried changing mode for DEBUG, true vs inverted?
    Code:
    DEFINE DEBUG_MODE 0   'or 1 (I can't remember which one at the moment)
    /Henrik.

  3. #3
    Join Date
    Dec 2009
    Location
    Annapolis, MaryLand, USA
    Posts
    1


    Did you find this post helpful? Yes | No

    Default Re: Serial comunication problem

    A couple of other things to check are the charge pump capacitors that you are using with your RS-232 chip and your circuit grounds.

  4. #4
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Serial comunication problem

    Based on your description, the data is either inverted, or being sent at the wrong speed. Verify setting match in both your code and on the PC, (for example 9600,8,N,1) and then check your clock on the PIC is correct. The speeds specified in PBP are only valid with a certain clock (4 MHz off the top of my head). You should not need to set DTR, or DCD. Final thing to check is that the RS232 cable is connected properly. If you have not crossed TX to RX, sometimes noise with give screens of garbage.

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Serial comunication problem

    Also, make certain that Hyperterm is set for Flow Control = None
    Charles Linquist

  6. #6
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default Re: Serial comunication problem

    Are you adding the '#' before the variable?

    And if you are using the built-in oscillator on the 16F676, are you sure your OSCCAL value is correct?

    Regards,

    Anand

  7. #7
    Join Date
    Sep 2011
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: Serial comunication problem

    Firs one thanks to all for fast answer.
    Yes I have checked all things posted and a lot of times.
    But nothing work.

    Maybe is a problem with a Breadboard thet collect noise ?

    I know it hard to say what check, but all seem fine and at
    same time nothing work!

    I am very confused because I have made a lot o circuit
    with PIC in assembler and basic, with motor, with display,
    with PWN dimmed ligght, and ever have worked fine,
    but now with a silly serial debugging purpose nothing
    work.
    I am very frustated!
    Last edited by synsyn; - 30th September 2011 at 21:01.

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