How do I program the microcontroller?

I would suggest you to go for 89s51, as it has ISP (In System Programming)
which means you don't need external/separate programmer.

You can use parallel port. Make connections as below
============================
Printer Port Pins - Microcontroller pins
============================
6 (D4) ---------- 9 Reset
7 (D5) ---------- 6 (P1.5 -MOSI)
8 (D6) ---------- 8 (P1.7 - SCK)
10 (ACK) ------- 7 (P1.6 - MISO)
18-25 (GND) --- 20 (GND)
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…