home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / sci / electron / 13654 < prev    next >
Encoding:
Text File  |  1992-07-30  |  2.1 KB  |  77 lines

  1. Newsgroups: sci.electronics
  2. Path: sparky!uunet!comp.vuw.ac.nz!am.dsir.govt.nz!grv!SRGXNBS
  3. From: srgxnbs@grv (Bruce Spedding)
  4. Subject: Re: 8051 help needed urgently!
  5. Message-ID: <1992Jul30.210531.2858@am.dsir.govt.nz>
  6. Sender: news@am.dsir.govt.nz
  7. Reply-To: srgxnbs@grv
  8. Organization: DSIR, Lower Hutt, New Zealand.
  9. References: <1992Jul30.070338.6778@uwm.edu>
  10. Date: Thu, 30 Jul 92 21:05:31 GMT
  11. Lines: 64
  12.  
  13. In article <1992Jul30.070338.6778@uwm.edu>, pegasus@csd4.csd.uwm.edu (David R Hucke) writes:
  14. >
  15. >Hi everybody!
  16. >
  17. >Well I finally got my 8051 compatible micro-controller in the mail
  18. >and got it all wired with a crystal and MAX232 chip and reset hardware.
  19. >
  20. >I was able to invoke the onboard serial program load mode and load a
  21. >program on the chip...
  22. >
  23. >The program simply set a bit on a port...
  24. >
  25. >I had an LED hooked up to port 1 pin 1 with a resistor and connected to
  26. >ground like this:
  27. >
  28. >               |
  29. >           |  Port 1 Pin 1
  30. >           |
  31. >           LED
  32. >           |
  33. >           ^v^v^v  150 ohm resistor
  34. >            |
  35. >                |
  36. >            GND
  37. >
  38. >So my first program was this:
  39. >
  40. >setb P1.1  ;; Set Port 1 Pin 1 to 1  
  41. >
  42. >This turned on the LED as expected...
  43. >
  44. >Now my second program was this:
  45. >
  46. >clr P1.1  ;; Set Port 1 Pin 1 to 0
  47. >
  48. >This should have turned off the LED.. It did not turn off the LED... In fact
  49. >nothing I do turns the LED off...
  50. >
  51. >Anybody have any idea what is going wrong?
  52. >
  53. >When I go into Serial Load mode (RST goes low) the LED still on also.
  54. >
  55. >Any help would be appreciated...
  56. >
  57. >
  58. >-- 
  59. >pegasus@csd4.csd.uwm.edu                David R. Hucke
  60. >                                        UW-Milwaukee Film Major
  61. >--
  62.  
  63. look at the 8051 spec sheet:
  64. 1. the outout is an active low not high
  65. 2. even if you wire it up with a resistor to +5V you'll probably still
  66. be exceeding the pin rating.
  67.  
  68. - buffer your output with some 4049/4050 devices, you can wire LEDs from
  69. +5V to the o/p of these w/o resistors as they self limit.
  70.  
  71. Bruce Spedding
  72. Materials Science and Performance
  73. Industrial Research Ltd,     Fax: +64-4-569-0132
  74. P.O.Box 31310,              Work: +64-4-569-0485
  75. Lower Hutt,  ( NZST : +12 ) Home: +64-4-562-8522
  76. New Zealand.  Internet: srgxnbs@grv.grace.cri.nz  
  77.