merhaba arkadaşlar
CCS uyumlu 6610 lcd driveri (epson) arıyorum.
yardımcı olacak arkadaşlara şimdiden teşekkürler
https://www.picproje.org/index.php/topic,15077&highlight=
https://www.picproje.org/index.php/topic,8235&start=150
CCS değil Keil ARM ama CSS için uydurabilirsin.
merhaba
umarım asagıdakı fıkır verır.
kolay gelsın
// This is the prototype for a Nokia 6610
// 132*132 pixel colour LCD driver.
//
// Rohit de Sa
// 24Dec07
// ver1.0
#include <18F2550.h>
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN
#use delay(clock=48000000)
// defines for pins
#define hard_cs pin_a1 //Chip select
#define hard_res pin_a2 //Reset
#define hard_clk pin_b1 //SPI clock
#define hard_sdo pin_c7 //SPI data out
// defines for constants
#define sleepout 0x11 //from datasheet
#define invon 0x21
#define colmod 0x3a
#define setcon 0x25
#define dispon 0x29
#define ramwr 0x2c
#define paset 0x2b
#define caset 0x2a
#bit SSPEN = 0xfc6.5
int1 command=0;
int1 data=1;
int i=0;
void write_command (int command)
{
SSPEN=0;
output_low(hard_clk);
delay_us(2);
output_low(hard_sdo);
delay_us(2);
output_high(hard_clk);
delay_us(2);
SSPEN=1;
spi_write(command);
delay_us(2);
}
void write_data (int data)
{
SSPEN=0;
output_low(hard_clk);
delay_us(2);
output_high(hard_sdo);
delay_us(2);
output_high(hard_clk);
delay_us(2);
SSPEN=1;
spi_write(data);
delay_us(2);
}
void main (void)
{
output_high(hard_cs); //initializing the LCD
output_high(hard_clk);
output_high(hard_sdo);
output_low(hard_res); //holding the LCD in reset
output_high(pin_a0); //pin connected to LCD backlight
setup_spi(spi_master|spi_h_to_l|spi_clk_div_64);
delay_ms(2); //are these delays necessary?
output_high(hard_res); //bringing LCD out of reset
delay_ms(2);
output_low(hard_cs); //enabling LCD
delay_us(2);
write_command(sleepout);
write_command(invon);
write_command(colmod);
write_data(0x03);
write_command(setcon);
write_data(0x10);
write_command(dispon);
write_command(paset);
write_data(0x00);
write_data(131);
write_command(caset);
write_data(0x00);
write_data(131);
write_command(ramwr); //shading part of the LCD white
for (i=0;i<255;i++)
{
write_data(0xff);
write_data(0xff);
write_data(0xff);
}
delay_us(2);
output_high(hard_cs); //deselecting the LCD
while (true)
{
}
}
bu sitede CCS ile yapılmış örnek devre var yalnız lcd ekran philips epson değil kolay gelsin.
http://www.hobbypic.com/index.php?option=com_content&task=view&id=15&Itemid=36
mp3dragon arkadaşımızın verdiği kodu çevirmeyi deniyecem.
Teşekkürler arkadaşlar