home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / sci / electron / 18406 < prev    next >
Encoding:
Internet Message Format  |  1992-11-06  |  9.8 KB

  1. Path: sparky!uunet!portal!lll-winken!cert!news.sei.cmu.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!batcomputer!cornell!rochester!rit!isc-newsserver!mxd7977
  2. From: mxd7977@ultb.isc.rit.edu (ELECTRONIC MUSICIAN)
  3. Newsgroups: sci.electronics
  4. Subject: Re: Idea for LED sequencer
  5. Message-ID: <1992Nov5.204635.18197@ultb.isc.rit.edu>
  6. Date: 5 Nov 92 20:46:35 GMT
  7. References: <1992Nov3.094923.44351@kuhub.cc.ukans.edu> <Bx7Ez4.MIM@news.cso.uiuc.edu>
  8. Sender: news@ultb.isc.rit.edu (USENET News System)
  9. Organization: Rochester Institute of Technology
  10. Lines: 292
  11. Originator: mxd7977@ultb
  12. Nntp-Posting-Host: ultb-gw.isc.rit.edu
  13.  
  14. heacock@kuhub.cc.ukans.edu (Doug Heacock) writes:
  15. >
  16. >>LED's in sequence, one after the other.  Here's my idea so far:  I
  17. >>intend to use half of a 4011 (quad 2-input NAND gate) as a clock
  18. >>oscillator to drive half of a 4518 (dual synchronous up counter),
  19. >>which will in turn drive a 4028 (BCD-to-decimal decoder), which will
  20. >>actually drive the LED's.  I was thinking I could connect all of the
  21. >>LED cathodes to ground through a single 330-ohm resistor, since only
  22. >>one would be lit at a time.
  23. >
  24. >>Does this sound workable?  I welcome more elegant solutions--these
  25. >>chips just happen to be the ones I have on hand at the moment.
  26. >>+-----------------------------------------------------------------+
  27. >>| Doug Heacock, Academic Computing   | heacock@kuhub.cc.ukans.edu |
  28. >>| Services, The University of Kansas | heacock@ukanvax.bitnet     |
  29. >>| Lawrence, KS 66045                 | Amateur radio: N0NZQ       |
  30. >>+-----------------------------------------------------------------+
  31.  
  32. For halloween I made a simple light sequencer for my halloween costume
  33. (I was going to a rave, and wanted to blink blink blink).  Anyway, this
  34. is what I did.  
  35.  
  36. First of all this is the original design:
  37.  
  38. 1 PALCE22V10 (I could have used any other pal with at least 5 outputs,
  39. but I had this one handy)... It was programmed as follows:
  40.     5 state variables
  41.     1 input MODE.
  42.  
  43.     when MODE was 0, the pal would count from 00000 to 01111 and
  44. then back to 00000 again.
  45.  
  46.     when MODE was 1, the pal would count from 00000 to 01111 to
  47. 11111 to 11110 to 11101 to 11100 to 11011 all the way back down to 10000
  48. and then back to 00000.  So in other words it counted up and then down.
  49. If I hadn't wanted this feature, I would have just used a simple
  50. counter.
  51.  
  52. 1 74LS154 4 to 16 line decoder which was hooked up to the 4 lsb's of the
  53. pal.
  54.  
  55. 1 555 timer with appropriate connections and r and c for an astable
  56. multi-vibrator (read clock signal generator).
  57.  
  58. 2 resistor networks (330 ohms)
  59.  
  60. 48 leds to be hooked up as follows:
  61.  
  62. +VCC----|>---VVVVVV----- output of 154
  63.        LED    330 ohm    ground when asserted
  64.  
  65. Since the 154 has negative logic outputs this set worked really well,
  66. when the output was unasserted, it would remain high and stop any
  67. current from flowing through the led circuit, and when it was asserted
  68. it would go low and sink the current from the led circuit.
  69.  
  70. Well this design would have worked fine and everything, but when I
  71. Implemented it I accidentally bought the wrong resistor networks, and
  72. instead of buying a resistor network with x amount of separate
  73. resistors, I bought a network where a common end of each resistor was
  74. tied together to one pin like so:
  75.  
  76.  
  77.  /---VVVVV---
  78.  | /-VVVVV---
  79. -----VVVVV---
  80.  | \-VVVVV---
  81.  \---VVVVV---
  82.  
  83. This would have worked to but I would have had to run both leads of both
  84. LEDS back to the R-network and since this was double the amount of wire
  85. needed, I decided to go with my actual design where:
  86.  
  87. I connected the leds directly from the output of the 154 to the led and
  88. the other end to ground.  Of course this created the converse effect
  89. where only one light was off at one time, but it was still neat.  
  90.  
  91. The actual costume consisted of a control and logic back that I had on
  92. my chest, connected to 4 1.5 Volt AA batteries (Vcc = 6volts), 16 leds
  93. connected in front in an infinity symbol so that when the brain was in
  94. MODE 0, the inifinity would look like it was cycling.  In the back I
  95. used the other 32 leds do realize the following pattern:
  96.  
  97.  
  98.          13    14
  99.  
  100.           9    10      
  101.                      
  102.           5     6      
  103.                      
  104. 16 12  8  1  2  3  7  11  15
  105.                      
  106.           4     4
  107.                      
  108. 15 11  7  3  2  1  8  12  16 
  109.                      
  110.           6     5      
  111.                      
  112.           10    9
  113.     
  114.       14   13
  115.  
  116.  
  117. Where the different numbers represent the different 154 outputs...
  118.  
  119. Here is the PAL file I used.   I hope I didn't bore everyone too much...
  120.  
  121.  
  122. ;PALASM Design Description
  123.  
  124. ;---------------------------------- Declaration Segment ------------
  125. TITLE    Rave halloween brain
  126. PATTERN  rave.pds
  127. REVISION 1.0
  128. AUTHOR   Mark Dochtermann
  129. COMPANY  RIT
  130. DATE     10/29/92
  131.  
  132. CHIP  rave PAL22V10
  133.  
  134. ;---------------------------------- PIN Declarations ---------------
  135. PIN  01         CK                                               ; INPUT 
  136. PIN  02         MODE                                             ; INPUT 
  137. PIN  03         NC                                               ; INPUT 
  138. PIN  04         NC                                               ; INPUT 
  139. PIN  05         NC                                               ; INPUT 
  140. PIN  06         NC                                               ; INPUT 
  141. PIN  07         NC                                               ; INPUT 
  142. PIN  08         NC                                               ; INPUT 
  143. PIN  09         NC                                               ; INPUT 
  144. PIN  10         NC                                               ; INPUT 
  145. PIN  11         NC                                               ; INPUT 
  146. PIN  12         GND                                              ; INPUT 
  147. PIN  13         OE                                               ; INPUT 
  148. PIN  14         NC                                               ; OUTPUT
  149. PIN  15         NC                                               ; OUTPUT
  150. PIN  16         NC                                               ; OUTPUT
  151. PIN  17         Q0                                               ; OUTPUT
  152. PIN  18         Q1                                               ; OUTPUT
  153. PIN  19         Q2                                               ; OUTPUT
  154. PIN  20         Q3                                               ; OUTPUT
  155. PIN  21         Q4                                               ; OUTPUT
  156. PIN  22         NC                                               ; OUTPUT
  157. PIN  23         NC                                               ; OUTPUT
  158. PIN  24         VCC                                              ; OUTPUT
  159.  
  160. ;----------------------------------- Boolean Equation Segment ------
  161. EQUATIONS
  162. Q0 :=     Q1*/Q4*/Q0 +
  163.     /Q1*/Q4*/Q0 +
  164.     MODE*Q1*Q2*Q3*/Q4 +
  165.     MODE*/Q0*Q1*Q4 +
  166.     MODE*/Q0*/Q1*Q2*Q4 +
  167.     MODE*/Q0*/Q1*Q3*Q4
  168. Q1 :=    Q0*/Q1*/Q4 +
  169.     /Q0*Q1*/Q4 +
  170.     Q0*Q1*Q4*MODE +
  171.     Q1*Q2*Q3*/Q4*MODE +
  172.     MODE*/Q0*/Q1*Q2*Q4 +
  173.     MODE*/Q0*/Q1*Q3*Q4
  174. Q2 :=    Q0*Q1*/Q2*/Q4 +
  175.     /Q1*Q2*/Q4 +
  176.     Q0*Q1*Q3*/Q4*MODE+
  177.     /Q0*Q1*Q2*/Q4+
  178.     Q1*Q2*Q4*MODE+
  179.     Q0*Q2*Q4*MODE+
  180.     /Q0*/Q1*/Q2*Q3*Q4*MODE
  181. Q3 :=    /Q2*Q3*/Q4*/MODE+
  182.     /Q1*Q3*/Q4*/MODE+
  183.     Q0*Q1*Q2*/Q3*/Q4+
  184.     /Q0*Q1*Q2*Q3*/Q4*/MODE+
  185.     Q3*MODE*/Q4+
  186.     Q1*Q3*Q4*MODE+
  187.     Q0*Q3*Q4*MODE+
  188.     Q2*Q3*Q4*MODE
  189. Q4 :=    Q3*Q4*MODE+
  190.     Q2*Q4*MODE+
  191.     Q1*Q4*MODE+
  192.     Q0*/Q1*/Q2*/Q3*Q4*MODE+
  193.     Q0*Q1*Q2*Q3*/Q4*MODE
  194.     
  195. ;----------------------------------- Simulation Segment ------------
  196. SIMULATION
  197. TRACE_ON CK CK Q0 Q1 Q2 Q3 Q4 MODE                   
  198. SETF /MODE
  199. PRELOAD    /Q0 /Q1 /Q2 /Q3 /Q4
  200. CHECK /Q0 /Q1 /Q2 /Q3 /Q4
  201. CLOCKF CK ; should be 00001
  202. CHECK /Q4 /Q3 /Q2 /Q1 Q0
  203. CLOCKF CK ; should be 00010
  204. CHECK /Q4 /Q3 /Q2 Q1 /Q0
  205. CLOCKF CK ; should be 00011
  206. CHECK /Q4 /Q3 /Q2 Q1 Q0
  207. CLOCKF CK ; should be 00100
  208. CHECK /Q4 /Q3 Q2 /Q1 /Q0
  209. CLOCKF CK ; should be 00101
  210. CHECK /Q4 /Q3 Q2 /Q1 Q0
  211. CLOCKF CK ; should be 00110
  212. CHECK /Q4 /Q3 Q2 Q1 /Q0
  213. CLOCKF CK ; should be 00111
  214. CHECK /Q4 /Q3 Q2 Q1 Q0
  215. CLOCKF CK ; should be 01000
  216. CHECK /Q4 Q3 /Q2 /Q1 /Q0 
  217. CLOCKF CK ; should be 01001
  218. CHECK /Q4 Q3 /Q2 /Q1 Q0
  219. CLOCKF CK ; should be 01010
  220. CHECK /Q4 Q3 /Q2 Q1 /Q0
  221. CLOCKF CK ; should be 01011
  222. CHECK /Q4 Q3 /Q2 Q1 Q0
  223. CLOCKF CK ; should be 01100
  224. CHECK /Q4 Q3 Q2 /Q1 /Q0
  225. CLOCKF CK ; should be 01101
  226. CHECK /Q4 Q3 Q2 /Q1 Q0
  227. CLOCKF CK ; should be 01110
  228. CHECK /Q4 Q3 Q2 Q1 /Q0
  229. CLOCKF CK ; should be 01111
  230. CHECK /Q4 Q3 Q2 Q1 Q0
  231. CLOCKF CK ; should be 00000
  232. CHECK /Q4 /Q3 /Q2 /Q1 /Q0
  233. SETF MODE
  234. CLOCKF CK ; should be 00001
  235. CHECK /Q4 /Q3 /Q2 /Q1 Q0
  236. CLOCKF CK ; should be 00010
  237. CHECK /Q4 /Q3 /Q2 Q1 /Q0
  238. CLOCKF CK ; should be 00011
  239. CHECK /Q4 /Q3 /Q2 Q1 Q0
  240. CLOCKF CK ; should be 00100
  241. CHECK /Q4 /Q3 Q2 /Q1 /Q0
  242. CLOCKF CK ; should be 00101
  243. CHECK /Q4 /Q3 Q2 /Q1 Q0
  244. CLOCKF CK ; should be 00110
  245. CHECK /Q4 /Q3 Q2 Q1 /Q0
  246. CLOCKF CK ; should be 00111
  247. CHECK /Q4 /Q3 Q2 Q1 Q0
  248. CLOCKF CK ; should be 01000
  249. CHECK /Q4 Q3 /Q2 /Q1 /Q0 
  250. CLOCKF CK ; should be 01001
  251. CHECK /Q4 Q3 /Q2 /Q1 Q0
  252. CLOCKF CK ; should be 01010
  253. CHECK /Q4 Q3 /Q2 Q1 /Q0
  254. CLOCKF CK ; should be 01011
  255. CHECK /Q4 Q3 /Q2 Q1 Q0
  256. CLOCKF CK ; should be 01100
  257. CHECK /Q4 Q3 Q2 /Q1 /Q0
  258. CLOCKF CK ; should be 01101
  259. CHECK /Q4 Q3 Q2 /Q1 Q0
  260. CLOCKF CK ; should be 01110
  261. CHECK /Q4 Q3 Q2 Q1 /Q0
  262. CLOCKF CK ; should be 01111
  263. CHECK /Q4 Q3 Q2 Q1 Q0
  264. CLOCKF CK ; should be 11111
  265. CHECK Q4 Q3 Q2 Q1 Q0
  266. CLOCKF CK ; should be 11110
  267. CHECK Q4 Q3 Q2 Q1 /Q0
  268. CLOCKF CK ; should be 11101
  269. CHECK Q4 Q3 Q2 /Q1 Q0
  270. CLOCKF CK ; should be 11100
  271. CHECK Q4 Q3 Q2 /Q1 /Q0
  272. CLOCKF CK ; should be 11011
  273. CHECK Q4 Q3 /Q2 Q1 Q0
  274. CLOCKF CK ; should be 11010
  275. CHECK Q4 Q3 /Q2 Q1 /Q0
  276. CLOCKF CK ; should be 11001
  277. CHECK Q4 Q3 /Q2 /Q1 Q0
  278. CLOCKF CK ; should be 11000
  279. CHECK Q4 Q3 /Q2 /Q1 /Q0 
  280. CLOCKF CK ; should be 10111
  281. CHECK Q4 /Q3 Q2 Q1 Q0
  282. CLOCKF CK ; should be 10110
  283. CHECK Q4 /Q3 Q2 Q1 /Q0
  284. CLOCKF CK ; should be 10101
  285. CHECK Q4 /Q3 Q2 /Q1 Q0
  286. CLOCKF CK ; should be 10100
  287. CHECK Q4 /Q3 Q2 /Q1 /Q0
  288. CLOCKF CK ; should be 10011
  289. CHECK Q4 /Q3 /Q2 Q1 Q0
  290. CLOCKF CK ; should be 10010
  291. CHECK Q4 /Q3 /Q2 Q1 /Q0
  292. CLOCKF CK ; should be 10001
  293. CHECK Q4 /Q3 /Q2 /Q1 Q0
  294. CLOCKF CK ; should be 10000
  295. CHECK Q4 /Q3 /Q2 /Q1 /Q0
  296. CLOCKF CK ; should be 00000
  297. CHECK /Q4 /Q3 /Q2 /Q1 /Q0
  298. TRACE_OFF
  299.  
  300.  
  301.  
  302.  
  303. Regards,
  304.  
  305. E.M.
  306.