home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.electronics
- Path: sparky!uunet!comp.vuw.ac.nz!am.dsir.govt.nz!grv!SRGXNBS
- From: srgxnbs@grv (Bruce Spedding)
- Subject: Re: 8051 help needed urgently!
- Message-ID: <1992Jul30.210531.2858@am.dsir.govt.nz>
- Sender: news@am.dsir.govt.nz
- Reply-To: srgxnbs@grv
- Organization: DSIR, Lower Hutt, New Zealand.
- References: <1992Jul30.070338.6778@uwm.edu>
- Date: Thu, 30 Jul 92 21:05:31 GMT
- Lines: 64
-
- 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 was able to invoke the onboard serial program load mode and load a
- >program on the chip...
- >
- >The program simply set a bit on a port...
- >
- >I had an LED hooked up to port 1 pin 1 with a resistor and connected to
- >ground like this:
- >
- > |
- > | Port 1 Pin 1
- > |
- > LED
- > |
- > ^v^v^v 150 ohm resistor
- > |
- > |
- > GND
- >
- >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
- >--
-
- look at the 8051 spec sheet:
- 1. the outout is an active low not high
- 2. even if you wire it up with a resistor to +5V you'll probably still
- be exceeding the pin rating.
-
- - buffer your output with some 4049/4050 devices, you can wire LEDs from
- +5V to the o/p of these w/o resistors as they self limit.
-
- 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
-