At89c2051 Projects File
Read a potentiometer using the on-chip comparator (P3.6 and P1.1) to adjust duty cycle.
void init_uart() = 0x20; TH1 = 0xFD; // 9600 @11.0592 MHz TR1 = 1; at89c2051 projects
Once you master these , you can move to its bigger brother – the AT89S52 (8KB flash, 3 timers, more I/O) – or even to ARM, but the logical foundation remains the same. Read a potentiometer using the on-chip comparator (P3
Timer interrupts, random number generation, button debouncing. Project 4: Frequency Counter (0-50 kHz) Difficulty: Advanced Components: External TTL signal source, LCD 16x2 (optional via 4-bit mode) TH1 = 0xFD
Servos require a 50Hz PWM signal with pulse widths from 1ms to 2ms.
void send_string(char *s) while(*s) SBUF = *s++; while(!TI); TI = 0;