RSS

Timer Interrupt Check (approx 1 second)

20 Jun

$regfile = “m16def.dat”
$crystal = 8000000
‘$sim
‘********************* LCD Configuration ***************************************
Config Lcd = 16 * 2
Config Lcdbus = 4
Config Lcdmode = Port
Config Lcdpin = Pin , Db4 = Portb.0 , Db5 = Portb.1 , Db6 = Portb.2 , Db7 = Portb.3 , E = Portc.5 , Rs = Portc.4
‘*******************************************************************************

Dim A As Single
Dim Count As Integer
Count = 0
A = 0
Config Timer1 = Timer , Prescale = 1

Enable Interrupts
Enable Ovf1

On Ovf1 Abhishek
Do
Cls
Lcd “Seconds==>>”
Lowerline
Lcd A
Waitms 100
Loop
End

Abhishek:
Count = Count + 1
If Count = 122 Then
Count = 0
A = A + 1
End If
Return

Advertisements
 
Leave a comment

Posted by on June 20, 2010 in AVR

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: