farzinkalali
Newbie level 3
- Joined
- Oct 29, 2014
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 30
hi
I am trying to write a program in bascom for attiny24 that after counting 200 pulses set the pina.2
would you please help me
my program is like this do you find any mistake on it?
it compiled successfully on bascom with no errors
but when I load it on proteous 7 for simulation it doesn't work and it seems that get stuck on loop and do not exit the loop even when the pulses reaches to 200
please help me
thank you
thank you
I am trying to write a program in bascom for attiny24 that after counting 200 pulses set the pina.2
would you please help me
my program is like this do you find any mistake on it?
it compiled successfully on bascom with no errors
but when I load it on proteous 7 for simulation it doesn't work and it seems that get stuck on loop and do not exit the loop even when the pulses reaches to 200
please help me
thank you
Code:
Code dot - [expand]
1 $regfile = "attiny24.dat "
2 $crystal = 8000000
3 config pina.2 = output
4 Config Timer0 = Counter , Edge = Rising
5 Start:
6 Tcnt0 = 0
7 Do
8 Loop Until Tcnt0 = 200
9 End
10 Set Pina.2
11 Wait 1
12 reset pina.2
13 End
thank you