| ??? 07/17/03 22:06 Read: times |
#50928 - Tea Timer using led |
Hi all:
I am a new 8052.com member have worked on computer hardware for over 20 years. I am now studing the 8031 core part using 89c2051 mcu. I would like to make a timer using 89c2051and a led to show end of the timing event, by turning the led off at end of the event. The timing event would end at 600 seconds or 10 minutes. My first idea which would be easier to implement, would be to flash led continuosly for 600 seconds then stop. Using program below. My second idea would be count up to 600 seconds and then turn on a led for 10 seconds and then turn off. Any help changing subroutine to these program changes would be greatly appreicated by me as a first time new member. LED.ASM ;PROGRAM TO DRIVE LED IN CURRENT SINK MODE $TITLE (CURRENT SINK LED DRIVER PROGRAM, FLASH ON/OFF $MOD51 ORG 0; RESET START ADDRESS SJMP START; JUMP OVER RESERVED ADDRESS SPACE ORG 20H; PROGRAM START ADDRESS ;SINGLE LED, CATHODE CONNECTED TO PORT 1 PIN 1 (P1.1) ;ANODE CONNECTED VIA A RESISTOR TO +5 VOLTS START: CLR P1.1; PUTS CATHODE TO LOGIC 0, TURNS LED ON ACALL DELAY; HOLDING DELAY SETB P1.1; PUTS CATHODE TO LOGIC 1, TURNS LED OFF ACALL DELAY; HOLDING DELAY, SETS FLASHING SPEED SJMP START; REPEAT DELAY: MOV R3, #0FFH; TRIPLE LOOP HOLDING DELAY LOOP2: MOV R2, #0FFH; LOOP1: MOV R1, #0FFH TAKE: DJNZ R1, TAKE DJNZ R2, LOOP1 DJNZ R3, LOOP2 RET END Regards, Ralph |
| Topic | Author | Date |
| Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
| RE: Tea Timer using led | 01/01/70 00:00 | |
RE: Tea Timer using led | 01/01/70 00:00 |



