|
|
View previous topic :: View next topic |
Author |
Message |
garret
Joined: 18 Mar 2005 Posts: 1
|
LCD with PIC18F6490 |
Posted: Fri Mar 18, 2005 7:34 am |
|
|
Hello,
i'm trying to drive a LCD varitronix VIM828 with the PIC18LF6490. I'm using PCWH ver 3.214 with MPLAB v.7.01. I've use this code:
#include <18f6490.h>
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=20000000)
byte CONST DIGIT_MAP[8] = {0x90,0xb7,0x19,0x36,0x45,0xff,0x00,0xaa};
#define DIGIT_1_CONFIG COM3+31,COM2+10,COM0+2,COM1+20,COM1+1,COM1+28,COM1+3,COM2+0
void main()
{
int i = 0;
setup_lcd(LCD_MUX14,1,ALL_LCD_PINS);
while (true)
{
for(i = 0; i<8; i++)
{
LCD_SYMBOL(0xff,DIGIT_1_CONFIG);
output_bit(PIN_C0,0);
output_bit(PIN_C1,1);
delay_ms(500);
output_bit(PIN_C0,1);
output_bit(PIN_C1,0);
delay_ms(500);
}
}
}
Someone know why I can't display nothing on the glass?
I connect bias resistor exactly like shown on page 263 of the data sheet.
I can't see any signal on the pin of the chip?
SOmeone can help me?
Thank you in advance
Roberto |
|
|
speedblue Guest
|
Re: LCD with PIC18F6490 |
Posted: Mon May 30, 2005 9:59 am |
|
|
garret wrote: | Hello,
i'm trying to drive a LCD varitronix VIM828 with the PIC18LF6490. I'm using PCWH ver 3.214 with MPLAB v.7.01. I've use this code:
#include <18f6490.h>
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=20000000)
byte CONST DIGIT_MAP[8] = {0x90,0xb7,0x19,0x36,0x45,0xff,0x00,0xaa};
#define DIGIT_1_CONFIG COM3+31,COM2+10,COM0+2,COM1+20,COM1+1,COM1+28,COM1+3,COM2+0
void main()
{
int i = 0;
setup_lcd(LCD_MUX14,1,ALL_LCD_PINS);
while (true)
{
for(i = 0; i<8; i++)
{
LCD_SYMBOL(0xff,DIGIT_1_CONFIG);
output_bit(PIN_C0,0);
output_bit(PIN_C1,1);
delay_ms(500);
output_bit(PIN_C0,1);
output_bit(PIN_C1,0);
delay_ms(500);
}
}
}
Someone know why I can't display nothing on the glass?
I connect bias resistor exactly like shown on page 263 of the data sheet.
I can't see any signal on the pin of the chip?
SOmeone can help me?
Thank you in advance
Roberto |
setup_lcd(LCD_MUX14,1,ALL_LCD_PINS);
--->
--->
--->
// in CCS PCWH 3.212
#BYTE LCDSE0= 0xF5A
#BYTE LCDSE1= 0xF5B
#BYTE LCDSE2= 0xF5C
#BYTE LCDSE3= 0xF5D
...
...
void main() {
LCDSE0=0b11111111;
LCDSE1=0b11111111;
LCDSE2=0b11111101;
LCDSE3=0b11111111;
setup_lcd(LCD_MUX14|STOP_ON_SLEEP|USE_TIMER_1);
...
...
} |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|