From: "Michael Culley"
References: <email@example.com> <firstname.lastname@example.org> <email@example.com>
Subject: Re: Max232 and 8051 drivin' me crazy
Date: Fri, 27 Dec 2002 17:29:21 +1100
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
> >The max232 chip is an inverting buffer, have you tried inverting the bits
> >you send out? Looping back will work due to two levels of inversion. Just
The 8051 serial pins are inverted also so I think this will cancel it out?
I've got an HC04 here so I will give it a try.
> Ja, try unplugging the 8032 and look at the MAX outputs with a meter,
> jumper the inputs to 0/5V, output should be the inverted level-shifted
> version. Check that +/-V are +/-9 or whatever at the chip.
For 5V in I get -9.46 Volts out, for 0V in I get 9.32 out, is this about
> Put a
> 'scope on the 8032 Txd output pin and make sure that *something* is
> happening (is /EA pulled low?).
I wish I had one, I could really tell what is going on then. I know the
circuit works because I ran a program on it to slowly toggle some of the
pins of the 8051 and that worked. When I put a volt meter on Txd it jumps
around from anywhere between 0 and 5V, so it must be doing something. It
seams to me that it is jumping around too slowly though, if it was running
at 2400baud I would have thought it would give a fairly steady voltage of,
say, 2.5Volts. EA is pulled low.
> Also, your program is not a loop, so chances are it produces, at
> best, one character when the reset is lifted. I have not looked at it
> further than that.
You may have misread it? It should be a loop.
> hi, tmod should be 20h, th1 should be f4h (11.059 xtal), setup scon
> before starting timer,your anl pcon,#7fh does nothing,(use a mov
> instruction) make sure your pc is setup for 7 bit data.
I will give this a try as soon as I can get hold of a new eprom programmer.