Picaxe switching on a Picaxe

davefish55

New Member
I have searched around to see if this has been handled and can't seem to find anything. I have an existing axe project that uses 4 magnetic reed switches on 4 axe inputs to determine which of 16 different lighting behaviors occur on a set of 5 LEDs. This is an 18X chip and inputs are through a ULN2803A. I would like to replace the current behavior with an 08M driving the 18X power on and off, while changing the open/closed state with 4 of the 08M pins. I am wondering -- can I drive the power (or ground leg) directly off an 08M pin, or should I use a relay or transistor? Should I use something like a BC548 as the "switch" for the 18X (driven by the 08M)? And my second question -- can I just treat the 08M outputs as being similar to the 5V currently being put on the 18X inputs through the 2803? Or do I need to take that out of the circuit. I am afraid my questions demonstrate the limits of doing projects by looking at existing circuits and code and trying to make something new. I'm not that bad on the code side, but very weak with the electricity. Thanks for any help.
 

kd5crs

Senior Member
I've run 20x2s directly off of an 08m with no issues. I used the 08m to reset the 20x2 by taking the V+ pin of the 20x2 low/high.

Just keep in mind the

1. Per pin current limit, and
2. The total Picaxe current limit.

Go above either of those and you will smoke something.

Brian
 

Technical

Technical Support
Staff member
Why do you actually need to switch the 18X on and off? It would be better to use an 08M output to drive the 18X reset pin, you could then hold the 18X in a permanent state of reset, which is basically the same as off.

Have you considered 4 control pins + 18X power/reset = 5 outputs on the 08M....
 

davefish55

New Member
Reset Pin

Thanks -- the reset pin is a better way to go. I am powering up/down to re-read the switch settings, which then branch me to one of the LED behaviors. The new configuration will have the 08M randomly cycling through pin high/low configurations to provide random settings (thanks to Hippy's random number routine examples).

Also -- I realized that I did not describe the circuit correctly. The 2803 is only used to drive the LEDs off the 18X -- the board is a Rev-Ed Pic 18 standard interface board. And I also started to think about kd5crs' point about adding up the current use from the various items and checking against limits. The reset pin idea seems to get around that problem.

Can I wire the four 08 outputs right into the inputs on the 18X -- or do I need some current limiting or diode protection?
 

Technical

Technical Support
Staff member
You can wire direct, but adding a 1k resistor is an added protection.
Remember the 08M does not have 5 outputs to give you 4 outputs + 1 reset!
 

Dippy

Moderator
Resistors are normally chosen to provide some safety.

And it REALLY WOULD HELP if you posted a schematic so that people can see EXACTLY what you wish to do. All this verbiage can lead to ambiguity.:rolleyes:
 

davefish55

New Member
Sorry

I have some 14M chips too -- so I will use one of them.

Dippy -- I plan to put this in the VSM and post the circuit if I still have questions. Might not happen for some days -- probably jumped the gun with the post.

Thanks for the help so far.
 
Top