The 8051 is really weak on the 8 pin side of things ..
The king of the hill of 8 pin Micro's is the PIC 16F508, but, based on similar chip, there is the PICAXE – family, with the PICAXE-08 being its 8-pin member ..
The PICAXE-family is only based on PICs, but the programming language is BASIC, so if you know just a little bit of BASIC you can easily switch to PICAXE ..
On top of that, PICAXE is programmable directly through serial port (3-wire) ..
Here is an example of PICAXE-based receiver that sets/resets pins after receiving simple commands through 3-wire (Tx, Rx and GND) serial port:
That’s really very tempting option ..
Otherwise, should this be done on 8051, there is the 89C2051, or LPC764 .., but all of them require special programmer, or an adaptor that reduces 40-pin standard 8051 to 20-pin 2051 ..
Regards,
IanP
Code:
180R
.---. .------. .---------------.
/ | .------. .----. .----| |---. | |
GND | O |--5------. .----| ===| 1 | O |----------' `------' `--| Digital Out |
| O | | | | .----| | || .------. | |
| O | .---|---|----| | ===| 2 | O ||----------.----| |------| Digital In |
| O | | | | | `----| | || | `------' | |
TX | O |--3--' `---|----| ===| 3 | O |---. _|_ 22K .--| 0v |
| O | | `------' `----' | | | | | |
RX | O |--2----------' | | | 10K | `---------------'
| O | | | | | PICAXE
| O | | `-.-' |
\ | 9-Way Female | | |
`---' Socket (DCE) --^------^---------------^-- 0v