bulldozer
Newbie level 1
Hello,
I am driving myself nuts over this trivial problem. The program execution is terribly slow! I am using HI-TECH compiler and simply using the LCD demo that came with the compiler. I have only added this main.c program:
The LCD works fine, however I can visibly see the words being printed in DEBUG MODE ONLY. It does NOT run in "release" if I select programmer and flash it.
My config bits are all set to disabled. I have Oscillator set at "XT".
The crystal is shaped like a tin can and is 3.579545MHz. I verified this with an O-scope. I have also placed 20pF caps to the correct locations.
Why is it running so slow?
I am driving myself nuts over this trivial problem. The program execution is terribly slow! I am using HI-TECH compiler and simply using the LCD demo that came with the compiler. I have only added this main.c program:
Code:
#include <htc.h>
#include "lcd.h"
void
main(void)
{
ADCON0=0; //turn off A/D
PCFG0=0;PCFG1=1;PCFG2=1;PCFG3=1; //PORTA all digital, except RA0
RBIE = 0; //Disable all PORTB Change interrupts
GIE = 0; // Global interrupt enable
lcd_init(FOURBIT_MODE);
lcd_goto(0); // select first line
lcd_puts("12345678");
lcd_goto(0x40); // Select second line
lcd_puts("Hello world");
for(;;);
}
The LCD works fine, however I can visibly see the words being printed in DEBUG MODE ONLY. It does NOT run in "release" if I select programmer and flash it.
My config bits are all set to disabled. I have Oscillator set at "XT".
The crystal is shaped like a tin can and is 3.579545MHz. I verified this with an O-scope. I have also placed 20pF caps to the correct locations.
Why is it running so slow?