On Wed, Jul 28, 2010 at 1:38 PM, Olin Lathrop wr= ote: > Drew Maurer wrote: > > I have a 16F747 and am attempting to communicate with my PC via a > > MAX233 translator - pretty standard stuff. However the PIC-to-PC > > direction is very unstable, dropping 1 out of 4 bytes seemingly at > > random. > > > > I'm using the HS oscillator with a 20MHz xtal. My link > > troubleshooting program replies to a 4-byte string with a 5-byte > > string and does absolutely nothing else. I've tried adding delays > > between bytes but still random bytes are *always* lost. Lengthening > > the string worsens the problem which makes me think this may be a > > timing problem, however I *am* using a crystal and haven't noticed > > the oscillator being "off" when measuring various periods from other > > test programs on this device. The PC-to-PIC direction is rock-solid. > > > > Slowing the baud rate to 2400 improves things vastly, with only ~1 > > byte out of 50 lost. But at 9600 (in either BRGH=3D0 or 1) the link is > > nigh on unusable. > > This smells like a problem with the MAX232, probably somewhere in the > charge > pumps. That would explain why the PC to PIC direction works fine since i= t > doesn't rely on the charge pumps. Look at the charge pump outputs. They > should be around -8V and +8V. The RS-232 output should also switch betwe= en > those levels, with -8V being the idle level. That's probably not what is > happening in your setup. > > Here's a self-serving suggestion: Next time just use one of these > http://www.embedinc.com/products/rslink2 > > > ******************************************************************** > Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products > (978) 742-9014. Gold level PIC consultants since 2000. > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > Thanks. Actually I've already 'scoped the levels in all directions, they look fine. In fact that MAX233 is new but the problem is not - I added the 233 because I thought the problem might be related to the crude level shifter made out of discretes (which borrowed -12V from the PC itself) that I was using, but the problem persists unchanged. Drew --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .