ilias80
Joined: 20 Mar 2007 Posts: 2
|
PIC16F913 with Varitronix LCD |
Posted: Thu May 03, 2007 10:56 am |
|
|
Greetings,
I just got the PIC16F913 and I am trying to use it with a varitronix LCD (VIM-503). I looked at this forum check for some example codes and found one but when I tried, almost all the LCD is on (with some segments darker than the other ones). Also I don't get on the hypeterminal(using rs232) the correct display. Here's the code I am executing. I connected seg0-seg6 and com0-com2 and 1/3 bias. Is there anything i am doing wrong? Thanks for the help. It would be greatly appreciated. I am just stuck and don't see any obvious solution. this is the link to my LCD: http://www.varitronix.com/Product/LCD/VIM-503-1(R0).pdf
#include <16F913.h>
#device adc=8
#FUSES NOWDT, INTRC_IO, NOPUT, NOPROTECT, NOMCLR, NOCPD, NOBROWNOUT, NOIESO, NOFCMEN, NODEBUG
#use delay(clock=8000000)
#use rs232(baud=1200,parity=N,xmit=PIN_A0,bits=8)
#byte LCDDATA0 = 0x110
#byte LCDDATA1 = 0x111
void main()
{
char i;
char value;
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF);
setup_spi(FALSE);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
setup_oscillator(OSC_8MHZ);//False);
setup_lcd(LCD_MUX13|LCD_INTRC|LCD_BIAS_PINS,7);
value = 0x01;
for(i = 0; i < 8; i++)
{
printf("test");
LCDDATA0 = value;
value <<= 1;
delay_ms(1000);
}
while(1)
{
}
} |
|