Jack// ani
Advanced Member level 3
Hi all,
I’ve written this simple program to count 1 to 25 and display the result on RS232 terminal software
#include <16F84A.H>
#fuses XT,NOWDT
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_A3, rcv=PIN_A2)
void main()
{
int i;
while(true)
{
i=1;
printf("RESET");
for(i=1;i<=25;i++)
{
printf("\nNumber is : ",i);
delay_ms(400);
}
}
}
But I can only see “Number is :” at the output, the numbers digits are missing! And after 25 times I get “RESET” as expected and everything repeats again. What could be the problem? Please help me.
Thanks
I’ve written this simple program to count 1 to 25 and display the result on RS232 terminal software
#include <16F84A.H>
#fuses XT,NOWDT
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_A3, rcv=PIN_A2)
void main()
{
int i;
while(true)
{
i=1;
printf("RESET");
for(i=1;i<=25;i++)
{
printf("\nNumber is : ",i);
delay_ms(400);
}
}
}
But I can only see “Number is :” at the output, the numbers digits are missing! And after 25 times I get “RESET” as expected and everything repeats again. What could be the problem? Please help me.
Thanks