At89c2051: Projects
Timer/counter modes, frequency measurement techniques. Project 5: Simple Servo Motor Controller Difficulty: Intermediate Components: SG90 or MG995 servo, 5V supply, potentiometer (10k)
Store code in EEPROM (external 24C02 via I2C emulation). Project 8: IR Remote Control Receiver (Sony SIRC or NEC) Difficulty: Advanced Components: TSOP38238 IR receiver, IR remote (TV/DVD remote) at89c2051 projects
So dig out that 8051 programmer, fire up Keil or SDCC, and start building. The world of classic embedded computing is waiting for you. Have you built an interesting project with the AT89C2051? Share it in the comments or on electronics forums – the retro computing community is always eager to see new ideas! Timer/counter modes, frequency measurement techniques
void main() = 0x01; TH0 = 0xFC; TL0 = 0x18; TR0 = 1; ET0 = 1; EA = 1; The world of classic embedded computing is waiting for you
Servos require a 50Hz PWM signal with pulse widths from 1ms to 2ms.
This project verifies your hardware and programmer work. Connect an LED with a 220Ω series resistor between P1.0 and GND. Code (C for SDCC/Keil): #include <at89x051.h> #include <delay.h> // simple delay function void delay_ms(unsigned int ms) unsigned int i, j; for(i = 0; i < ms; i++) for(j = 0; j < 1275; j++);
while(1) if(button_pressed()) display_dice((random % 6) + 1); delay_ms(200);