Help with pic16f690 -max232cpe


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Can you post the schematic?

    Al.

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


    Did you find this post helpful? Yes | No

    Default

    Something doesn't work with your wiring:

    Max232 pin 10 should be connected to pic 16F690 pin 10 (RB7 Tx)

    Max232 pin 9 should be connected to pic 16F690 pin 12 (RB5 Rx)

    Connect a decoupling capacitor 10nF from Vdd to Vss on pic power pins.

    Al.
    All progress began with an idea

  3. #3
    Join Date
    Apr 2010
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Well it is connected that way pin 10 -> rb7 and pin9 -> rb5

    The 16f690 was not in the schematics program but that how i connected it.

    but im reading -10v on rs232 pin 3 and 5 is that right?

    I dont have a 0,01uf can i use 0,1uf?
    wait i think it's on the demo board

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


    Did you find this post helpful? Yes | No

    Default

    but im reading -10v on rs232 pin 3 and 5 is that right?
    Yes! Max232 is a voltage level translator.

    I dont have a 0,01uf can i use 0,1uf?
    Yes!

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

  5. #5
    Join Date
    Apr 2010
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Yes! Max232 is a voltage level translator.



    Yes!

    Al.
    That did nothing, is there a way to check if the signal is coming out from pin 9 on max232?

  6. #6
    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

  7. #7
    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

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