+ Post New Thread
Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 41 to 60 of 67
  1. #41
    Member level 3
    Points: 942, Level: 6

    Join Date
    Dec 2011
    Location
    Chennai
    Posts
    67
    Helped
    8 / 8
    Points
    942
    Level
    6

    Re: uart driver for pic16f877a

    http://extremeelectronics.co.in/micr...ller-tutorial/


    http://extremeelectronics.co.in/avr-...-writing-data/

    U better go through the link which is displayed, you may get better points how to connect a pic to computer....

    - - - Updated - - -

    Quote Originally Posted by swapna u View Post
    Hi,

    Is it necessary to make use of MAX-232 level converter for communication with the hyperterminal or will the RS-232 cable take care of it?


    http://extremeelectronics.co.in/micr...ller-tutorial/


    http://extremeelectronics.co.in/avr-...-writing-data/

    U better go through the link which is displayed, you may get better points how to connect a pic to computer....



  2. #42
    Member level 1
    Points: 266, Level: 3

    Join Date
    May 2012
    Posts
    41
    Helped
    0 / 0
    Points
    266
    Level
    3

    Re: uart driver for pic16f877a

    Hi,

    I checked the voltage level b/w the pin 6 and pin 15(GND) and it reads -9.34V. But still when I short the pin 13 and pin 14 of MAX-232 the loopback does'nt happen and I don't receive the data on RCREG. Is there any other problem?Please help!

    Thankyou



  3. #43
    Super Moderator
    Points: 63,230, Level: 61
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,479
    Helped
    3388 / 3388
    Points
    63,230
    Level
    61

    Re: uart driver for pic16f877a

    It should work with pins 13 and 14 linked. The data leaves the PIC TX pin at 5V level, goes into pin 11 of the MAX232, leaves at RS232 levels on pin 14. Linking pin 14 to 13 should make the RS232 data come back out of the MAX232 at 5V levels again on pin 12 and go straight back into to PIC RX pin.

    Can you try another MAX232 or if you haven't got one, try using the other transmitter and receiver pins instead. There are twio identical transmitters and two identical receivers insdide the IC.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  4. #44
    Member level 1
    Points: 266, Level: 3

    Join Date
    May 2012
    Posts
    41
    Helped
    0 / 0
    Points
    266
    Level
    3

    Re: uart driver for pic16f877a

    Hi,

    I have a doubt regarding the pins13 and 14 of MAX-232. Pin 13 actually is the input pin which receives serially transmitted data at RS 232 logic level; connected to transmitter pin of PC serial port and pin 14 is the output pin which outputs the serially transmitted data at RS232 logic level; connected to receiver pin of PC serial port. Since it takes data from rs232 which is at different logic level than PIC's TTL logic level, is it possible to get the data reflected in RCREG of PIC,when I short the pins 13 and 14 of MAX232?Please clarify

    Thankyou



  5. #45
    Super Moderator
    Points: 63,230, Level: 61
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,479
    Helped
    3388 / 3388
    Points
    63,230
    Level
    61

    Re: uart driver for pic16f877a

    Yes, it is correct.

    PIC data is 0 = VSS, 1 = VDD
    MAX232 converts this to RS232 levels. 0 = +12V, 1 = -12V which leave it on pin 14.
    ------- Pin 14 is linked to pin 13 to test the path -------------
    MAX232 converts RS232 levels on pin 13 baxk to PIC levels at pin 12.

    I'm trying to estanlish four things:
    1. If yhe PIC TX and RX pins are linked, can it see it's own data - you have confirmed it can.
    2. If the PC TX and RX pins are linked, can it see it's own data - you have confirmed it can.
    3. if the MAX232 is linked at the PIC side, can the RXREG see it's own data sent from TXREG - you have conformed it can.
    4 if the MAX 232 is linked at the PC side, can the RXREG see it's own data sent from TXREG - this is still not confirmed.

    The levels on the logic side and RS232 sides of the MAX232 are completely incompatible but if you convert from one ot the other and back again, the device should appear transparent.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  6. #46
    Member level 1
    Points: 266, Level: 3

    Join Date
    May 2012
    Posts
    41
    Helped
    0 / 0
    Points
    266
    Level
    3

    Re: uart driver for pic16f877a

    Hi,

    Linking MAX-232 at the PC side is nothing but shorting pins 13 and 14 right?When I tried it I am not getting data reflecting back from TXREG to RCREG. I am doubting if there is any problem with the MAX-232 IC. Because I have read many posts which tell this IC would fail after many hours of usage if there is a static shock at any point. So please tell me how I can test the IC?Or what other things can be the problem in this case?

    Thankyou

    - - - Updated - - -

    Hi,

    And about using the alternate TX RX pins on MAX232 chip. Pin 7 and pin8 act as alternate TX RX pins but these are not used in the PIC board as the internal connection between pin 13 to pin3 of rs232 connector(db9) and pin 14 to pin2(db9) is done inside the board. So if I again short pins7 and 8 of MAX232 then there will be 2 sets of TX RX operations happening. This is the problem I am facing. Please help me with a solution.

    Thankyou



  7. #47
    Super Moderator
    Points: 63,230, Level: 61
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,479
    Helped
    3388 / 3388
    Points
    63,230
    Level
    61

    Re: uart driver for pic16f877a

    Well, if you feed a signal through two inverters you should end up with the same out as you put in. The MAX232 is simply an IC with an inverting transmitter and inverting receiver, the voltage levels are different but that doesn't matter. If you are saying this is what you see:

    TXTREG ----(logic levels)---> MAX232 pin 14 ---(RS232 levels) ---> MAX232 pin 12 ---(Logic levels)---> RCREG. With MAX232 pins 13 and 14 linked.

    Is not working, either the MAX232 is faulty, something else is connected to it and loading the signal or there is a break in the wiring.

    The only other possibility is you are running at very high baud rates by overclocking the PIC or setting the baud rate > 120Kbps but even then over such a short link it would probably work.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   Alt13th June 2012, 08:08

      advertising

        
       

  8. #48
    Member level 1
    Points: 266, Level: 3

    Join Date
    May 2012
    Posts
    41
    Helped
    0 / 0
    Points
    266
    Level
    3

    Re: uart driver for pic16f877a

    Hi,

    I am checking if the IC is working properly. I checked the voltage between pin 16(VCC) and pin 15(GND) and it read 5V. Now I want to check the capacitors voltages but I don/t know the ranges and I am not able to get information about it. I am using MAX232CN IC. Please tel me the voltage ranges of the capacitors and any other tests to verify the IC.

    Thankyou

    - - - Updated - - -

    Hi,

    Here is the circuit diagram of the max232 which I am using.



    Thankyou



  9. #49
    Super Moderator
    Points: 63,230, Level: 61
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,479
    Helped
    3388 / 3388
    Points
    63,230
    Level
    61

    Re: uart driver for pic16f877a

    The MAX232 has an internal charge pump so it can produce RS232 voltage levels from it's own 5V supply line. The high voltages are not stabilized so they may vary from one device to another but as a general rule you should find about +10V on pin 2 and about -10V on pin 6. The other capcitors have signals on them so a voltage measurement would not give a meaningful reading. If they have failed, the 10V would not be present though.

    If you have the IC isolated from the rest of the circuit, power it up with capcitors connected and tie the logic inputs to ground, the outputs should go to about +10V. Then tie the logic inputs to 5V, the outputs should go to -10V, in other words, the polarity is inverted and the voltage swings from + to -.

    Brian.

    - - - Updated - - -

    Problem solved - I think.

    Looking at the diagram you posted, you have the transmit and receive crossed over. The PIC TX pin (RC6) should connect to pin 11 and the RX pin (RC7) to pin 12.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  10. #50
    Member level 1
    Points: 266, Level: 3

    Join Date
    May 2012
    Posts
    41
    Helped
    0 / 0
    Points
    266
    Level
    3

    Re: uart driver for pic16f877a

    Hi,

    That was the schematic of the MAX232 which I got along with the development board. If according to what you say,the transmit and receive are crossed over,then how else can I rectify it?Because the IC is inbuilt and the connections are soldered with the development board,what other option I have to rectify it?And according to my schematic pin 13 with respect to the ground reads 0V and pin 14 wrt ground reads -10V. Is this reading correct? Please clarify..

    Thankyou

    - - - Updated - - -

    Hi,

    Please upload the correct max232 schematic and its connections with db9 if you have.


    Thankyou



  11. #51
    Super Moderator
    Points: 63,230, Level: 61
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,479
    Helped
    3388 / 3388
    Points
    63,230
    Level
    61

    Re: uart driver for pic16f877a

    The connection is always TX of one device to RX on the next and so on.
    The schematic attached is correct but it uses the other transmitter and receiver in the MAX232. the pin numbers are shown, all you have to do is swap T2 with T1 and R2 with R1.

    Brian.

    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  12. #52
    Member level 1
    Points: 266, Level: 3

    Join Date
    May 2012
    Posts
    41
    Helped
    0 / 0
    Points
    266
    Level
    3

    Re: uart driver for pic16f877a

    Hi,

    Thankyou Betwixt for this information. I wonder how the kit manufacturers have messed up the important connections! Really shocking. Now I can't use this kit for my project. I shall take MAX232 IC and try out by crossconnectiong the RC6 to pin 11 and RC7 to pin 12. I will get back if any other doubts.

    Thanks a lot



  13. #53
    Super Moderator
    Points: 63,230, Level: 61
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,479
    Helped
    3388 / 3388
    Points
    63,230
    Level
    61

    Re: uart driver for pic16f877a

    It happens sometimes and I think some of the cheap 'prototype' boards on the Internet are actually rejects because of incorrect design. I have one here with an LCD display on it that has the RS line connected to ground making it impossible to use the LCD at all!

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  14. #54
    Member level 1
    Points: 266, Level: 3

    Join Date
    May 2012
    Posts
    41
    Helped
    0 / 0
    Points
    266
    Level
    3

    Re: uart driver for pic16f877a

    Hi,

    Oh that is so wierd. I actually have two kits with the same schematic on both the boards!!Here in this case if I am not able to transmit receive to/from hyperterminal, atleast the loopback should work as the swapping of connections does'nt make a difference in loopback right? But my pin 13(R1IN) reads 0V wrt GND(pin 15). Would that be the reason for the loopback from TXREG to RCREG to not happen? I should justify my statement as I need approval to buy a different board so please let me know.Pin 14(T1OUT) reads 9.1V wrt GND(pin 15).Please let me know.

    Thankyou



  15. #55
    Super Moderator
    Points: 63,230, Level: 61
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,479
    Helped
    3388 / 3388
    Points
    63,230
    Level
    61

    Re: uart driver for pic16f877a

    The logic level side inputs should read 0V or close to it, the logic side outputs should read either 0V or close to 5V. The RS232 side outputs should read either +10V or -10V although the 9.1V you measure is perfectly acceptable. RS232 inputs should read around 0V. These are without anything driving the IC, obviously if something drives a pin high it will have more voltage on it.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   Alt16th June 2012, 11:40

      advertising

        
       

  16. #56
    Advanced Member level 3
    Points: 4,828, Level: 16
    papunblg's Avatar
    Join Date
    Oct 2010
    Location
    Kolkata India
    Posts
    726
    Helped
    172 / 172
    Points
    4,828
    Level
    16
    Blog Entries
    9

    Re: uart driver for pic16f877a

    Quote Originally Posted by swapna u View Post
    Hi,

    Thankyou Betwixt for this information. I wonder how the kit manufacturers have messed up the important connections! Really shocking. Now I can't use this kit for my project. I shall take MAX232 IC and try out by crossconnectiong the RC6 to pin 11 and RC7 to pin 12. I will get back if any other doubts.

    Thanks a lot
    Swapna, You must be using a cable to connect your PC's port and the DB9 connector of your Kit. Plesae check the cable. What is written on the cable? Is it a straight cable or is it a Cross over cable. I think the the kit manufacturers has supplied two types of cables for two kits. Check the documentation.
    The point is - Where the cross over is implemented - in the cable or in the Board?
    Rajsekhar Nag
    -------------..--------
    Knowledge Grows When Shared



  17. #57
    Super Moderator
    Points: 63,230, Level: 61
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,479
    Helped
    3388 / 3388
    Points
    63,230
    Level
    61

    Re: uart driver for pic16f877a

    papunblg - in this case the board is wired with the PIC side of the MAX232 reversed. The PIC TX is wired to the output of the MAX232 and the RX to it's input. They should be the other way around, a TX pin always drives an RX pin. It seems to be a PCB layout mistake and there may also be an eror on the MAX232 to DB9 side as well. You are wise to alert us to the possibility of a cross-over cable though.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   Alt16th June 2012, 13:28

      advertising

        
       

  18. #58
    Member level 1
    Points: 266, Level: 3

    Join Date
    May 2012
    Posts
    41
    Helped
    0 / 0
    Points
    266
    Level
    3

    Re: uart driver for pic16f877a

    Hi Papunblg,

    Actually the kit manufacturers have just supplied the kit and the connectors along with the debugger and adapter. There are no cables supplied. So I have myself done the soldering of wires by taking two DB9 connectors. I connected the PIC side TX(pin 3) to the PC side RX(pin 2) and the PIC side RX(pin 2) to PC side TX(pin 3) and common GND(pin 5) of both DB9 connectors. This is how I have connected the cable.

    Thankyou



  19. #59
    Member level 1
    Points: 266, Level: 3

    Join Date
    May 2012
    Posts
    41
    Helped
    0 / 0
    Points
    266
    Level
    3

    Re: uart driver for pic16f877a

    Hi Betwixt,

    I have another doubt with respect to the pin diagram of MAX232 IC. The data which comes in through the T1IN(pin 11) is connected internally to TOUT(pin14) or to R1IN(pin 13) of the IC?Please clarify.

    Thankyou

    - - - Updated - - -

    Hi Betwixt,

    I have another doubt with respect to the pin diagram of MAX232 IC. The data which comes in through the T1IN(pin 11) is connected internally to TOUT(pin14) or to R1IN(pin 13) of the IC?Please clarify.

    Thankyou



  20. #60
    Super Moderator
    Points: 63,230, Level: 61
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,479
    Helped
    3388 / 3388
    Points
    63,230
    Level
    61

    Re: uart driver for pic16f877a

    The IC has two converter channels from Logic to RS232 and two converter channels from RS232 to logic levels, they work completely independent of each other.

    Logic to RS232:
    T1IN (pin 11) signal comes out on T1OUT (pin 14)
    T2IN (pin 10) signal comes out on T2OUT (pin 7)

    RS232 to Logic:
    R1IN (pin 13) signal comes out on R1OUT (pin 12)
    R2IN (pin 8) signal comes out on R2OUT (pin 9)

    There is no link between 'R' and 'T' signals.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



--[[ ]]--