PIC and NPN transistors

Damn, how do you get the ascii art to come out correctly? I tried doing it in a text editor this time and it looked good in preview, but then posted like garbage. I'll try to explain what I did.

Nand 1 has Pic and enable as its inputs. Nand 2 has RC and and NOT_enable as its inputs Nand 3 has its inputs tied together and enable as its input and NOT_enable as its output. Nand 4 has its inputs connected to the oputputs of NAND 1 and NAND 2. Nand 4 output goes to servo. This way a 1 on enable allows 1 path and a 0 allows the other path. The pwm gets inverted twice so it is back to normal. All in1 chip. Does this make sense? Also copy the drawing above and place it in a text editor (I used outlook set in plain text mode) and the drawing looks ok.

Ringo

Reply to
ringo.davis
Loading thread data ...

Try notepad. Also, the drawing is not "above" unless you are posting thru "google groups".

Reply to
Si Ballenger

The ASCII works fine for me, since I've set up my reader with a fixed font (courier). Thanks for the suggestions. One other thing that I will try is to play with CMOS switches and opto relays. I found one MM74HC4066 and a LCC110 on the lab here at the office and I need to do some tests with it. If it works, it may be the cleanest way to go. I'm almost sure the opto relay won't work, but I'll experiment either way.

Cheers

Padu

Reply to
Padu

Before you get more complicated try the TWO diodes that Ringo originally showed. This is how to steer the logic to make an OR. From the sound of your earlier post, you provided, you added only one diode to one one of the outputs? Do a G or Y search for 'diode and gate' (or 'diode or gate') and you should see some examples like the kind Ringo provided. The difference between a diode AND or OR gate is the position of the resistor (pull up pull down) and the direction of the diodes.

Aren't there any more available pins the PIC you already have that you could use it to steer the logic to a single output? If not, an 8-pin PIC with an internal oscilliator to handle the logic has gotta be easier than what you're going through now. It would take you five minutes to program...

-- Gordon

Reply to
Gordon McComb

A guy from the piclist gave me this suggestion, and now I feel so dumb of not having that idea before...

Instead of dealing with separate components to make my logic to work, get a PIC12F (my compiler doesn't support 10F) which costs less than 1 buck and implement the logic myself. I've already tested on my simulator and it works fine. The 12F has internal

4MHz clock, so it should be fast enough for R/C PWM signals, and it has enough gpio ports (I only need 3 inputs and 1 output).

So the program that will run on my PIC has only one line on an infinite loop:

OUTPUT = RF_PWM and not CTRL or CTRL and PIC_PWM

Any reason not to use a PIC?

Cheers

Padu

Reply to
Padu

PolyTech Forum 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.