Getting into Digital circuits

I would like to get back into electronics to build some projects. Back many moons ago in HS I did some stuff with electronics simple stuff with

555 timers and things. I'm hoping I can find someone that is familiar with building digital circuits that could use some help programming, there's nothing I do better than programming. Let me describe the project I have in mind now so I can get some input on what I need to buy to get started.

I would like to be able to use a microprocessor of some kind that I can program via RS232, that will turn on or off a large number of lights. I was thinking I could have the processor output the number of the light it wanted, and if it wanted to turn on or off. Maybe it would just toggle the light, so every time a lights number came up, it would just alternate it between on and off. My first project will have about 30 lights, but I would like the design to be expandable. Since an 8 bit number gives us 256, I was thinking that would be the limit. Maybe have modules that will control a group of, say 8 lights, that can plug into the output of the processor, then another module can plug into the previous one. . . For now the lights are just going to be 20mW LEDs, but I have plans for projects that will need either around 5W lights, or gangs of 10 to 20 LEDs. So I will need some kind of relay, I guess a solid state relay of some kind would be best. As I glance through my mouser catalog I see several different programmable controllers that look like they would work for something like this, but I have no idea which one to use. Thanks in advance for any suggestions.

If this isn't the best NG for this please let me know which one is. There seem to be a lot of electronics NGs.

Also I recently purchased a few prototype boards on ebay and one came with several IC chips and things. Where is a good reference that will tell me what they all are and what they do? Back in HS we had a reference book that told all about various common IC chips and gave some sample circuits. Surely these days there is some on line reference like that.

--
Chris W

Gift Giving Made Easy
Get the gifts you want & 
give the gifts they want
http://thewishzone.com

"They that can give up essential liberty 
to obtain a little temporary safety 
deserve neither liberty nor safety." 
-- Benjamin Franklin, 1759 Historical Review of Pennsylvania
Reply to
Chris W
Loading thread data ...

What about something like the RABBIT Microprocessor modules? Wouldn't that be the easy way? Could I program something like that in C?

Also does someone make some kind of IC chip that takes say 3 bit binary number for input on 3 pins and then makes one of 8 output pins go high based on the input binary number?

--
Chris W

Gift Giving Made Easy
Get the gifts you want & 
give the gifts they want
http://thewishzone.com

"They that can give up essential liberty 
to obtain a little temporary safety 
deserve neither liberty nor safety." 
-- Benjamin Franklin, 1759 Historical Review of Pennsylvania
Reply to
Chris W

Even better: Most PIC's can be programmed over their In-System-Programming ports, and all it needs is a simple circuit; the manufacturer,

formatting link
has the DIY-programmer somewhere in their application-sheets.

The ideal multipurpose workhorse that I fell in love with is the PIC16F88, a little beast we are now using in a wearable device we develop at the University. My greates flaw is, I'm lousy at rogrmming, my skill is designig circuitry.

I have an idea for a very cheap, but highly versatile wearable device in my head, but I would need to first develop the circuitry and look for the parts and their costs ( it should be a device priced about 30$, requiring a PeeCee somewhere, connecting to it by wireless. ). That baby would need some good amount of programming, especially on the PC's side, where a lot of outputs would need to be redirected, requiring, hum... sorta like a X-driver for the parallel port ;)

Anyway.

My PIC of choice for multipurpose -USage is the PIC 16F88. 2*8Bit-Ports, so lotsa outputs.

--
Hochachtungsvoll

RĂ¼diger
Reply to
Ruediger

--
I couldn't find loedown's post to reply to it specifically, but the
HC238 is an HC138 with positive true outputs.
Reply to
John Fields

These sort of applications are ideal for PIC chips, simple to use, require almost no auxilliary circuitry, and are easy to program. Very steep learning curve, and the programmer will set you back somewhere in the order of $200 AUD, but the PIC 18F672 has provision for RS232 and multiple outputs (22).

Paul

Reply to
loedown

I also found the 238 version which is more what I want. Can you tell me more about how I would use and EPROM to do that and is there a 4 to 16 line encoder too? I can't find one at Mouser.com

--
Chris W

Gift Giving Made Easy
Get the gifts you want & 
give the gifts they want
http://thewishzone.com

"They that can give up essential liberty 
to obtain a little temporary safety 
deserve neither liberty nor safety." 
-- Benjamin Franklin, 1759 Historical Review of Pennsylvania
Reply to
Chris W

The 74HC138 is such a chip but the outputs go low based upon the input. You can do this function with any EPROM if you wish.

Reply to
Lord Garth

I don't know where I encoder came from I meant to type decoder. the search for demultiplexer found the 4 to 16 line version at mouser.com

Let me see if I get the idea. It sounds like the EPROMs mostly have an

8 bit output. So for the case of turning on 1 of 8 lights, I basically program in 8, 8 bit numbers so I would use 8 bytes or 64 bits of memory from the EPROM. Are EPROMs that have 16 bit output very expensive? Or would I be better off using 2 with 8 bit outputs? The EPROM way sounds like an interesting solution. I want to have the possibility of having as many as 16 separate boards that each control 16 lights. So I could program the EPROM(S) on each board to respond to 8 bit binary inputs like so..

Board 1 responds to 0 to 15 Board 2 responds to 16 to 31 Board 3 responds to 32 to 47 .. . . Board 16 responds to 240 to 255

I like that!

Now for a few questions. Would an 8 bit output from a PIC have a problem driving as many as 16 of these circuits hooked in parallel? My first application is going to drive a single high intensity white LED on each of the possible 256 output lines. I believe they draw around 20mA at about 3.5V, will I need some kind of driver or will the circuit handle enough power to drive all 16 lights on each board at a time? Finally how to turn on or off each LED, and leave them in that state till the next signal. Would a flip flop would be the way to go? Some way to tell it to turn off or on might be nice, that way I wouldn't have to keep as close a track to which lights were on and which were off.

--
Chris W

Gift Giving Made Easy
Get the gifts you want & 
give the gifts they want
http://thewishzone.com

"They that can give up essential liberty 
to obtain a little temporary safety 
deserve neither liberty nor safety." 
-- Benjamin Franklin, 1759 Historical Review of Pennsylvania
Reply to
Chris W

Sure Chris,

Firstly, you need to call it a decoder. Either a 3 to 8 demultiplexer / decoder or a 4 to 16 demultiplexer. The old TTL part number for this was the 74154.

To use a EPROM for this function, you would program the output pattern to whatever you need for a given input pattern. The inputs go to the address lines, A3 A2 A1 A0 for 4 bits and the unused address lines are grounded. Don't forget to enable the EPROM with its *CS input and enable its outputs with the *OE input. Many need the Vpp pin set high as well.

This is a great use for those old 2K EPROMs that often get tossed. Newer EPROM part numbers usually reflect the number of bits (not bytes) they can hold. A 27128 holds 128k bits which is arranged as 16k x 8. Older EPROMs had part numbers like 2716. The 2716 is 2k x 8. Address range from 0000 through 1FFF, most of which will be wasted in your application but its a wasted part by most standards.

Note too that you can use two '238 to form a 16 line decoder by making use of the enable inputs. The A2 A1 A0 inputs go to both 238s while A3 goes to the active high enable one 238 and the active low enable on the other.

Have fun and let us know if you need an EPROM programmed.

Reply to
Lord Garth

address

outputs

I would never allow the PIC to drive the lamps directly, I'd buffer the outputs in one of several ways.

The EPROM is always used in a minimum of a byte so excepting for the part number, there is no need to concern yourself about the number of bits you have used. 16 bit EPROMs are more expensive and few cheap programmers can use handle them, better to use two 8 bit device and some very easy control logic as described for dual 238s. You can also look into multiplexing the outputs to accomplish your goal.

Maxim has an IC that, in one mode of operation, can address as many as 64 separate lamps. I do not recall its part number but this chip might well be worth your time to investigate.

I need to run, I have work to do.....

Reply to
Lord Garth

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.