I am trying to connect a 16X2 LCD to a pic18f452 controller.
i understand all the 2X16 LCD displays have the same attachments, anyway the LCD i'm using is - winstar wh1602a
i need the LCD to show a FLOAT data type called volume .
The conections i made:
1 - GND
2- 5V
3- GND
4- RD2
5- GND
6- RD3
11- RD4
12- RD5
13- RD6
14- RD7
from what i could find on the net i wrote the following code (i need to use C programming lamguge...)
***** initialize ****
#include <p18C452.h>
#include <stdio.h>
#include <iostream>
#include <p18f452.h>
#include <delays.h>
#pragma config WDT = OFF // disable watchdog
#include <stdio.h>
#include <iostream>
#include <xlcd.h>
#include <windows.h>
void DelayFor18TCY( void )
{
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
Nop(); Nop();
}
void DelayPORXLCD( void )
{
Delay1KTCYx(15); //Delay of 15ms
return;
}
void DelayXLCD( void )
{
Delay1KTCYx(5); //Delay of 5ms
return;
}
****************************************
here comes the (main)
volume is calculated and now i want to write to the LCD
**** writing to LCD *******
OpenXLCD ( EIGHT_BIT & LINES_5X7 ); // configure external LCD
putrsXLCD ("The Volume Is ");
putsXLCD (Volume);
*****************************************
obviosly it doesn't work.
anyone has a working code for the PIC18f452 ?
all i need is initialization and the writing a number (volume) to the screen
Thanx !
i understand all the 2X16 LCD displays have the same attachments, anyway the LCD i'm using is - winstar wh1602a
i need the LCD to show a FLOAT data type called volume .
The conections i made:
1 - GND
2- 5V
3- GND
4- RD2
5- GND
6- RD3
11- RD4
12- RD5
13- RD6
14- RD7
from what i could find on the net i wrote the following code (i need to use C programming lamguge...)
***** initialize ****
#include <p18C452.h>
#include <stdio.h>
#include <iostream>
#include <p18f452.h>
#include <delays.h>
#pragma config WDT = OFF // disable watchdog
#include <stdio.h>
#include <iostream>
#include <xlcd.h>
#include <windows.h>
void DelayFor18TCY( void )
{
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
Nop(); Nop();
}
void DelayPORXLCD( void )
{
Delay1KTCYx(15); //Delay of 15ms
return;
}
void DelayXLCD( void )
{
Delay1KTCYx(5); //Delay of 5ms
return;
}
****************************************
here comes the (main)
volume is calculated and now i want to write to the LCD
**** writing to LCD *******
OpenXLCD ( EIGHT_BIT & LINES_5X7 ); // configure external LCD
putrsXLCD ("The Volume Is ");
putsXLCD (Volume);
*****************************************
obviosly it doesn't work.
anyone has a working code for the PIC18f452 ?
all i need is initialization and the writing a number (volume) to the screen
Thanx !