Help with pic16f690 -max232cpe


Closed Thread
Results 1 to 37 of 37

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    That did nothing, is there a way to check if the signal is coming out from pin 9 on max232?
    Yes place a led with 1K in series from pin 9 to gnd.

    But, I am more interested on how many IO pins you are using. Now If you have inputs pins floating (not connected) this can produce wierd result.

    I noted in your code, that you are not setting the tris registers, please do it. Set all non used pins as output and place them to a logic zero.

    Example (I assume you are using only the serial pins) :

    TrisA = %00000000
    PortA = 0

    TrisB = %00100000 ' if the only input is pin 10 Rx
    PortB = 0

    TrisC = %00000000 ' if none of the portC pins are used
    PortC = 0

    The above code has to be written on top of your code. It will set all non used port as outputs @ logic zero, avoiding to leave inputs floating.

    If your arrangement is different modify the tris command to suite your need.

    Al.
    Last edited by aratti; - 18th April 2010 at 23:50.
    All progress began with an idea

  2. #2
    Join Date
    Apr 2010
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Yes place a led with 1K in series from pin 9 to gnd.

    But, I am more interested on how many IO pins you are using. Now If you have inputs pins floating (not connected) this can produce wierd result.

    I noted in your code, that you are not setting the tris registers, please do it. Set all non used pins as output and place them to a logic zero.

    Example (I assume you are using only the serial pins) :

    TrisA = %00000000
    PortA = 0

    TrisB = %00100000 ' if the only input is pin 10 Rx
    PortB = 0

    TrisC = %00000000 ' if none of the portC pins are used
    PortC = 0

    The above code has to be written on top of your code. It will set all non used port as outputs @ logic zero, avoiding to leave inputs floating.

    If your arrangement is different modify the tris command to suite your need.

    Al.
    I did that now but still nothing usful, it seems that the data is coming out from the max but it wont register at all i do get something when i send like 200 times with 10ms

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


    Did you find this post helpful? Yes | No

    Default

    Is the ground (pin #5) of the serial connector really connected to +5 volts like the schematic?

  4. #4
    Join Date
    Apr 2010
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    Is the ground (pin #5) of the serial connector really connected to +5 volts like the schematic?
    No just i did not lay to much work in the schematics. but no it's connected to ground

  5. #5
    Join Date
    Apr 2010
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    here is the updated right one.

    And i found a probleme wich seems od. when using any freq other than 4mhz the buad rating is all wrong.
    check out this forum discussion about it

    http://www.mikroe.com/forum/viewtopic.php?f=13&t=11114
    Attached Images Attached Images  

  6. #6
    Join Date
    Apr 2010
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    I found another forum thred about turning the MCLRE_OFF

    how do i do that?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by krise86 View Post
    I found another forum thred about turning the MCLRE_OFF

    how do i do that?
    Check the configuration word register. Page 201 of the data sheet.

Members who have read this thread : 0

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