Cordiali Saluti
Luca
Moderatore:
Paolino
LucaPR ha scritto:è appena arrivato il display, inizio a fare lo stampato per l'alimentazione...
LucaPR ha scritto: se hai tempo potresti farmi uno schema di collegamento tra display e PIC, non ho ben capito..![]()


#include <system.h>
#include "LucaPR.h"
#define LCD_ARGS 2, /* Interface type: mode 0 = 8bit, 1 = 4bit(low nibble), 2 = 4bit(upper nibble) */ \
1, /* Use busy signal: 1 = use busy, 0 = use time delays */\
PORTB, TRISB, /* Data port and data port tris register */ \
PORTB, TRISB, /* Control port and control port tris register */ \
1, /* Bit number of control port is connected to RS */ \
2, /* Bit number of control port is connected to RW */ \
3 /* Bit number of control port is connected to Enable */
#include <lcd_driver.h>
void main()
{
}


LucaPR ha scritto:Ok, scritto e compilato, vorrei porre una domanda, ho guardato nel datashhet del display, ma non c'è o forse non lo notato.. per settare luminosità e contrasto, lo si deve fare con un programma interno o vi sono dei pulsanti appositi..!??


LucaPR ha scritto:Con il montaggio sono a buon punto, mi mancano solo pochi componenti che dovrebbero arrivarmi a giorni..
#include <system.h>
#include "LucaPR.h"
#define LCD_ARGS 2, /* Interface type: mode 0 = 8bit, 1 = 4bit(low nibble), 2 = 4bit(upper nibble) */ \
1, /* Use busy signal: 1 = use busy, 0 = use time delays */\
PORTB, TRISB, /* Data port and data port tris register */ \
PORTB, TRISB, /* Control port and control port tris register */ \
1, /* Bit number of control port is connected to RS */ \
2, /* Bit number of control port is connected to RW */ \
3 /* Bit number of control port is connected to Enable */
#include <lcd_driver.h>
// Prototipi delle funzioni
void inizializza (void);
void main()
{
inizializza();
lcd_clear();
lcd_gotoxy(0,0);
lprintf ("TEST FUNZIONAMENTO");
lcd_gotoxy(0,1);
lprintf ("DISPLAY LCD");
lcd_gotoxy(0,2);
lprintf ("FORUM ELECTROPORTAL");
lcd_gotoxy(0,3);
lprintf ("electroportal.net");
delay_s (3);
while(1)
{
}
}
void inizializza (void)
{
// Inizializza le porte
// PORTA e PORTC tutte INPUT
// PORTB: lcd_setup();
trisa=0x3F;
trisc=0xFF;
lcd_setup();
}
lcd_gotoxy (0,3);

Torna a Realizzazioni, interfacciamento e nozioni generali.
Visitano il forum: Nessuno e 9 ospiti