Posts

Showing posts from July, 2015

Long Delay Timer Circuit for Refrigerators(Old Types)

Image
/ * My refrigerator does not have an automatic temperature cut-off system. So i made a long delay cut 0ff timer using 89c2051 micro controller . Here i am going to explain how it is made. */ Calculation: Crystal frequency Used in circuit = 12Mhz Frequency for 1 Machine cycle = 12/12 Mhz ie = 1Mhz ie Time period for 1 Machine cycle = 1Micro seconds Now Calculate for 50 Milli Seconds = (50x10^-3) / (1x 10^ -6) = 50000 We program Timer O in Mode1 (16 bit) ie maximum value is FFFF (H), or 65535 (10) 65535 - 50000 = 15535 Equivalent HEX value for Decimal 15535 = 3CAF So in program : TL0 = AF TH0 = 3C This will generate for 50 Milli Seconds, we need to calculate for 2 hours and Half an hours Now Moving to the Program: / **********************************************************************/ #include<AT89x051.h>   int i,j;      void delay1()     //Delay for 2 hours {      TMOD=0x01;  ...