Helena,
Skimask is right.
There are many people looking for ready-cooked cake around here.
Here is some hints for you to show us whether you can do something on your own and continue on this code.
Code:
Btn1 VAR PORTB.0 'First Button
Led1 VAR PORTB.4 'First Led
TenMin CON 100 'A constant value for Ten-Minute timing condition.
TIME VAR WORD 'Variable for Timing
IF Btn1 = 0 THEN
WHILE Btn1=0 : WEND 'Wait for finger release.
TIME = TenMin 'Set initial timing value.
HIGH Led1 'Activate first LED.
WHILE TIME > 0 'Set a timing condition.
PAUSE 6000 'Wait for 6 second.
TIME = TIME - 1 'Decrement "initial" timing value.
WEND 'Total of TenMin*6000ms passed; 600,000ms = 10minutes.
LOW Led1 'De-Activate first LED.
ENDIF
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks