3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

can anyone suggest a microcontroller that would allow me to controll 19 outputs from an rs232 connection?

I was thinking of some kind of PICAXE chip

8 answers
sort by: active | newest | oldest
Sep 26, 2009. 10:55 AMsteveastrouk says:
Use an P89C51RD2. 3 x 8 bits available straight away, two sacrificed to the serial port, 22 bits
Sep 26, 2009. 12:43 PMAndyGadget says:
Yep, that would do it. Here's the datasheet. It will give you a one chip solution but you'll need a PIC programmer to go with it and need to find a suitable compiler to generate the code. Watch the output currents too. The maximums are 15mA per output, 26mA per port and 71mA for the whole chip. If you're not familiar with PICs you'll find the PicAxe much easier to get to grips with as it (in conjunction with the programming software) looks after most of the 'tricky bits' for you.
Sep 26, 2009. 9:22 PMseandogue says:
If you have need for a bank of higher output digital I/O (up to 50mA/ch) you can always interface to the loads using a PS2501 or similar. They're isolators but can be used in isolated or non-isolated mode.
Sep 27, 2009. 12:13 AMsteveastrouk says:
You don't need ANY programmer, you bang it directly through the RS232 port, so its dead easy - Force the PSEN line high at reset and you're in "programming" mode. NXP supply a free package to program it called FlashMagic.

For what the OP wants, Keil do a "free" compiler which will have enough memory for what they need to do. Failing that, there is SDCC and a couple of free Pascal compilers, as well as Jan Waclawek's wonderful BASIC52 replacement at http://efton.sk/basic/index.htm - put this in the 89C51 and all the programming can be done at a terminal, and the code runs very well. I used to use BASIC52 in production instruments, with sideorders of assembler for speed in a couple of places.
Oct 4, 2009. 11:26 AMsteveastrouk says:
On a classic 8052 ALL the IO pins are inputs and outputs - there is no configuration required.
Sep 26, 2009. 3:42 AMAndyGadget says:
The largest PicAxe - the 40X2 - will only give you 16 outputs (if I'm counting correctly). Look at P74 HERE. If you're planning to use a PicAxe, I'd be tempted to use a pair of the new 20X2 chips. The first would do the RS232 bit and drive 8 of the outputs directly. The second would be programmed as an adressable latch and would handle the other 11 outputs, the inputs being generated from the first chip.
Don't forget the max current from a pin is 20mA and the max from a chip is 100mA (figures from memory - check!) so buffering may be necessary.
Alternatively, use a 20X2 and 3 octal latched buffer chips (e.g. 74LS373) which would make the addressing easier and increase the current drive.
Sep 26, 2009. 4:02 AMAndyGadget says:
Whoops - Miscount in method 1. Not enough pins. I'd go for one 20X2 and 2 x 373 chips. Drive three of your OPs from the PicAxe directly (with simple buffer if necessary) and latch the other 16. What sort of speed are you looking to switch the outputs at?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!