Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I earlier built the serial port board from the jal tutorial book, which is basically connecting a PIC and a D-9 directly to the MAX232. Now I'm reading AN1310 on the high-speed PIC16/18 bootloader. In figure 7 on page 6 I see this circuit uses 470Ω resistors on the MAX232 outputs. Will the jal-board work with the bootloader? Can it possibly break down the MAX232 or PIC? And most important: why would I use resistors on the MAX232 outputs?

share|improve this question
3  
Safety or EMI reasons I'd guess. If you have the resistors, you won't be able to kill the PIC if you set the serial port pins to inputs. Also the resistors slow down the signal edges a bit, so there's less EMI. Another note: The Application note uses MAX3232! The main difference is that MAX3232 works well with 3.3 V too, while MAX 232 is rated for 5 V operation only, so you can have problems if you want to use it with a 3.3 V part. In general, try to use 3232 if you can obtain it, it's not much more expensive. –  AndrejaKo Jan 10 '13 at 18:20
    
Okay, that all sounds reasonable. If you submit it as an answer I can accept it (unless better answers come up of course) –  Camil Staps Jan 10 '13 at 18:23
    
You're right. It seems I got this habit of answering questions in comments... –  AndrejaKo Jan 10 '13 at 18:24
1  
Haha, well it's safer if you're not quite sure of course. But this looks good ;-) –  Camil Staps Jan 10 '13 at 18:25
add comment

2 Answers

up vote 4 down vote accepted

Safety or EMI (Electromagnetic interference) reasons I'd guess. If you have the resistors, you won't be able to kill the PIC if you set the serial port pins to low.

The application note uses 3.3 V supply, so if we configure the UART pins as low, we'll get at most around 8 mA of current, which should be safe for microcontroller to sink.

Also the resistors slow down the signal edges a bit, so there's less EMI.

share|improve this answer
1  
Afraid this answer seems to be a bit confused; with a common ground it's not the logic "low" levels which may require current limiting, but rather the logic "high" levels. –  Chris Stratton Jan 10 '13 at 20:00
    
@ChrisStratton I think AndrejaKo means logic low, which in RS232 signaling is a positive voltage? –  vicatcu Jan 10 '13 at 20:04
    
@vicatcu - the question does not concern the RS232 portion of the circuit. –  Chris Stratton Jan 10 '13 at 20:05
    
@Chris Stratton I might not have been as clear as I should have. The idea is that if we somehow set the microcontroller's UART pins to logic low, we'll need current limiting in case the other end of the line somehow gets to logic high since they'll start sinking current. –  AndrejaKo Jan 10 '13 at 20:11
1  
@Chris Stratton MAX does have fixed pins, but microcontroller doesn't. The pins with resistors are the pins on which MAX provides output, so they will go high. If the pins on the microcontroller connected to MAX are set to low for some reason, then I don't see any reliable way to limit the current. –  AndrejaKo Jan 10 '13 at 21:32
show 2 more comments

This is often used for lazy level shifting, such as from 5v to 3.3v.

The internal protection diodes typically present on the lower supply voltage device keep the voltage on the inputs from rising too high, while the resistors limit the current which the diodes have to handle.

share|improve this answer
1  
I'd rather say it's a type on the schematic than voltage translation. The first schematic is 3.3 V only while the second schematic with the MOSFET has the microcontroller running on 5 V and MAX3232 on 3.3 V. There's no need to have voltage translation, since MAX3232 works fine with 5 V too and we have that supply available. The MOSFET is there to protect MAX3232 from high voltage available during programming. If I remember correctly, PICs need 12 V on MCLR to be programmed. –  AndrejaKo Jan 10 '13 at 19:36
    
No, it is probably not a "typo" –  Chris Stratton Jan 10 '13 at 19:59
    
12V to program!? how dumb... come on Microchip :) –  vicatcu Jan 10 '13 at 20:02
    
@vicatcu - actually, it's not dumb at all, it's a clever trick to avoid having to reserve pins for programming functions, since applying the high voltage over-rides their normal capabilities. Others use it too. Really old technologies actually needed the high voltage to drive the charge into storage, so the idea of programmers needing higher than logic voltages is well accepted in the marketplace. –  Chris Stratton Jan 10 '13 at 20:06
    
@Chris Stratton How did you come to that conclusion? As far as I can see, the application note doesn't mention level translation at all. I think that they'd mention it if they tried to do voltage translation too. –  AndrejaKo Jan 10 '13 at 20:14
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.