At89c2051 Projects -

while(1) if(button_pressed()) display_dice((random % 6) + 1); delay_ms(200);

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++); at89c2051 projects

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) Project 8: IR Remote Control Receiver (Sony SIRC

void main() = 0x01; TH0 = 0xFC; TL0 = 0x18; TR0 = 1; ET0 = 1; EA = 1; TH0 = 0xFC

Add a push button to increment the count manually. Project 3: Digital Dice with 7 LEDs Difficulty: Intermediate Components: 7 LEDs (arranged like a dice face), 7x 220Ω resistors, 1 push button