Article View: sci.electronics
Article #1532Re: 8051 help needed urgently!
From: srgxnbs
Date: Sun, 02 Aug 1992 21:21
Date: Sun, 02 Aug 1992 21:21
45 lines
2424 bytes
2424 bytes
In article <1992Jul30.165112.10990@ole.cdac.com>, ssave@ole.cdac.com (Shailendra Save) writes:
> In article <1992Jul30.070338.6778@uwm.edu> pegasus@csd4.csd.uwm.edu (David R Hucke) writes:
>>
>>Hi everybody!
>>
>>Well I finally got my 8051 compatible micro-controller in the mail
>>and got it all wired with a crystal and MAX232 chip and reset hardware.
>>I had an LED hooked up to port 1 pin 1 with a resistor and connected to
>>ground like this:
>>So my first program was this:
>>setb P1.1 ;; Set Port 1 Pin 1 to 1 This turned on the LED as expected...
>>Now my second program was this:
>>clr P1.1 ;; Set Port 1 Pin 1 to 0 This should have turned off the LED..
>>It did not turn off the LED... In fact nothing I do turns the LED off...
>>Anybody have any idea what is going wrong?
>>When I go into Serial Load mode (RST goes low) the LED still on also.
>>Any help would be appreciated...
>>pegasus@csd4.csd.uwm.edu David R. Hucke
>> UW-Milwaukee Film Major
>
>
> When you clear a port pin, it is pulled to a tristate 1. It does not
^^^^^ ^^^^^^^^ no its not
> put a 0 onto the pin. I would think you want to write a "0" onto the
^ yes it does
> port to turn the led off. Same with RST.
the output on most CMOS uPs has a nominal active low (about 3*LSTTL)
and in the 8051 clear/0 = low
When a high/set/1 is written to a port there is a short duration strong
pullup to overcome line capacitance (usually 1 or 2 clock cycles) which is then
turned off and a weak (uA) pullup remains. This strong pullup can result in
glitches if the port is operated in a "wired-OR" mode
>
>
> -S
> ssave@ole.cdac.com
--
Bruce Spedding
Materials Science and Performance
Industrial Research Ltd, Fax: +64-4-569-0132
P.O.Box 31310, Work: +64-4-569-0485
Lower Hutt, ( NZST : +12 ) Home: +64-4-562-8522
New Zealand. Internet: srgxnbs@grv.grace.cri.nz
Technical Details
Message-ID:
<1992Aug3.092125.16835@grace.dsir.govt.nz>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!waikato.ac.nz!comp.vuw.ac.nz!windy!grace!srgxnbsReferences:
<1992Jul30.070338.6778@uwm.edu> <1992Jul30.165112.10990@ole.cdac.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!waikato.ac.nz!comp.vuw.ac.nz!windy!grace!srgxnbs Newsgroups: sci.electronics Subject: Re: 8051 help needed urgently! Message-ID: <1992Aug3.092125.16835@grace.dsir.govt.nz> From: srgxnbs@grace.dsir.govt.nz Date: 3 Aug 92 09:21:25 +1200 References: <1992Jul30.070338.6778@uwm.edu> <1992Jul30.165112.10990@ole.cdac.com> Organization: DSIR, Gracefield, New Zealand Lines: 45