Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@harshad-ukH5ww • Mar 19, 2009
Please share your Source with us we will help you.
-
@fernandor-koYuJY • Mar 19, 2009
thank you in advance for your help
here is my code
I am trying count 1 seg but is not working it is counting 4 seg.
After 4 seg appear 1 seg on lcd.
Another problem:
How create .cof file.
I am trying simulate using proteus to watch the variables but the .cof file was not create.
#include <16C77.h>
#use delay(clock=4000000)
#include <lcd.c>
int counter;
int seg=0;
#int_TIMER0
void TIMER0()
{
set_timer0(0);
counter++;
if(counter == 15)
{
counter=0;
seg++;
}
}
void main() {
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_256|RTCC_8_BIT);
enable_interrupts(INT_RTCC);
enable_interrupts(GLOBAL);
while (1)
{
lcd_init();
lcd_gotoxy(1,1);
printf(lcd_putc, "\f tempo \n %i segundos",seg);
delay_ms(200);
}
}