RUKAEF
Newbie level 2
I try to use XLCD library with default pin setup,
It compiled successfuly.
But when I simulate it gives this error.
When I only use OpenXLCD command, It again gives same arror.
Here is my code,
It compiled successfuly.
But when I simulate it gives this error.
[HD44780] Attempted to read after writing a single nibble [LCD1]
When I only use OpenXLCD command, It again gives same arror.
Code:
OpenXLCD(FOUR_BIT & LINES_5X7);
Here is my code,
Code:
#define _XTAL_FREQ 8000000
#include "confighed.h"
#include "xc.h"
#include "plib/xlcd.h"
#include "plib/delays.h"
void DelayFor18TCY(void)
{
Nop(); Nop(); Nop(); Nop(); // 18 cycle delay
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
Nop(); Nop();
return;
}
void Delay_Seconds(unsigned char s)
{
unsigned char i,j;
for(j = 0; j < s; j++)
{
for(i = 0; i < 100; i++)__delay_ms(10);
}
}
void DelayPORXLCD(void)
{
Delay1KTCYx(30);
}
void DelayXLCD(void)
{
Delay1KTCYx(10);
}
void initXLCD(void){
OpenXLCD(FOUR_BIT & LINES_5X7);
while(BusyXLCD());
WriteCmdXLCD(0x06);
WriteCmdXLCD(0x0C);
}
void main(void) {
TRISB = 0;
PORTB = 0;
initXLCD();
putrsXLCD("RUK");
while(1){
}
}