EmbeddedRelated.com
Forums
Memfault State of IoT Report

8051 newbie

Started by Unknown December 12, 2005
> He has a AT89C4051 it can sink 20ma per pin. The regular 8051 of course can > not. The AT89C4051 can not source enough current to drive an LED. > > It is all in the data sheet.
I realy don't care that much about driving an LED. I just looked at the design to see if I missed anything. The only thing I got to work for about 5 minutes is that one pin would either go high or low based on another pin. It worked after I changed my capacitor from 10uF to 1uF. I got so exited that I tried to run part of my origanal program which is to generate a 40khz pulse. The original problem happened. All pins are high except both analog pins. So I reloaded the working program, in hopes to prove that maybe my code is bad. The problem persists. All pins are high except the analog pins. I have 5 chips to play with and three so far exhibit the same results. I can not imagine that they are all bad. I'm left to believe that I can not use Keil as a reliable compiler/assembler. Or that my programmer is not working. But if it programs and reads a chip exactly as it was programmed, I can't imagine it being the problem. And if I try running a hex file I downloaded and it still does not work, it probably isn't Keil either. The circuit is simply power, ground, capacitor connected to reset and 5V, external oscillator connected to pin5. All that is left is to turn the chip around so that the notch is not pin 1.

richardscheff@gmail.com wrote:

> > He has a AT89C4051 it can sink 20ma per pin. The regular 8051 of course can > > not. The AT89C4051 can not source enough current to drive an LED. > > > > It is all in the data sheet. > > I realy don't care that much about driving an LED. > > I just looked at the design to see if I missed anything. > > The only thing I got to work for about 5 minutes is that one pin would > either go high or low based on another pin. > > It worked after I changed my capacitor from 10uF to 1uF. I got so > exited that I tried to run part of my origanal program which is to > generate a 40khz pulse. > > The original problem happened. All pins are high except both analog > pins. > So I reloaded the working program, in hopes to prove that maybe my code > is bad. > The problem persists. All pins are high except the analog pins. > > I have 5 chips to play with and three so far exhibit the same results. > I can not imagine that they are all bad. > > I'm left to believe that I can not use Keil as a reliable > compiler/assembler. > Or that my programmer is not working. > But if it programs and reads a chip exactly as it was programmed, I > can't imagine it being the problem. > And if I try running a hex file I downloaded and it still does not > work, it probably isn't Keil either. > > The circuit is simply power, ground, capacitor connected to reset and > 5V, external oscillator connected to pin5. > > All that is left is to turn the chip around so that the notch is not > pin 1.
1> Kiel is a Very good product. The Demo Version is limited. 2> the Metalink assembler is free. 3>here is a link to someones working board http://chaokhun.kmitl.ac.th/~kswichit/Proto2051_web/Proto2051.html The Basic setup 10 Gnd 20 Vcc with a .1uF ceramic cap to gnd. 1 Reset 10uF to Vcc and 10K to gnd 5 Ocs In IF you are using square wave oscillator with a TTL output. If you are using a Crystal it goes from 4 to 5 with a 22pf cap to gnd on each one. 4> www.8052.com is a good place for 8052 based information. 5> Are you sure your code is working? try to write 0 to a port, 100 NOPs write FF to the port, then jump back to 0. Or Google for a demo hex file. Good luck. PS the Notch IS pin 1 if the notch is to your left pin1 is the bottom left pin.
richardscheff@gmail.com wrote:
>> He has a AT89C4051 it can sink 20ma per pin. The regular 8051 of course can >> not. The AT89C4051 can not source enough current to drive an LED. >> >> It is all in the data sheet. > > I realy don't care that much about driving an LED. > > I just looked at the design to see if I missed anything. > > The only thing I got to work for about 5 minutes is that one pin would > either go high or low based on another pin. > > It worked after I changed my capacitor from 10uF to 1uF. I got so > exited that I tried to run part of my origanal program which is to > generate a 40khz pulse. > > The original problem happened. All pins are high except both analog > pins. > So I reloaded the working program, in hopes to prove that maybe my code > is bad. > The problem persists. All pins are high except the analog pins. > > > I have 5 chips to play with and three so far exhibit the same results. > I can not imagine that they are all bad. > > I'm left to believe that I can not use Keil as a reliable > compiler/assembler. > Or that my programmer is not working. > But if it programs and reads a chip exactly as it was programmed, I > can't imagine it being the problem. > And if I try running a hex file I downloaded and it still does not > work, it probably isn't Keil either. > > > The circuit is simply power, ground, capacitor connected to reset and > 5V, external oscillator connected to pin5. > > All that is left is to turn the chip around so that the notch is not > pin 1. >
can you tell me the URL of your program. would like to try to run it here. rw

Memfault State of IoT Report