hi i am trying to make a project and her is a small part of it
here is the code
but when i use tmr0h my nothing happens i am useing a 4 MHz and isis simulator and in anther part of it i get this error
"Simulation is not running in real time due to excessive CPU load".
here is the code
Rich (BB code):
sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;
sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
char lcd[6];
unsigned long x ;
void main() {
TRISA=1 ;
TRISd = 0;
PORTd= 0 ;
delay_ms(200);
LCD_Init();
LCD_Out(1, 1, "Speed In RPM:");
TMR0H = TMR0L = 0;
T0CON=96;
delay_ms(2000);
while(1) { x = (TMR0H<<8 ) + TMR0l;
inttostr (x,lcd);
lcd_out(2,1,lcd);
delay_ms (2000);
}
}
"Simulation is not running in real time due to excessive CPU load".
Last edited by a moderator: