Quantcast
Channel: Reprap Forum
Viewing all articles
Browse latest Browse all 39321

[beta test] GLCD 128/64 sur melzi 1284p (1 reply)

$
0
0
Salut les gens, bon ben j'ai eu une foldarap de la part d'EmmanuelG et je commence à la construire, et un truc qui m'a tiqué : une foldarap devrait étre complément transportable, et donc devrait étre totalement autonome donc > LCD, encodeur rotatif, lecteur de carte SD....
Dans le kit que j'ai eu la carte de gestion est une Melzi V2.0, y'a bien une option pour gérer un panelolu2 (achat d'un module) ou un LCD graphique mais sur une carte dédié.....
je me suis dit pourquoi pas me claquer un truc qui va gérer ma folda autrement que par des trucs surfait?
j'ai donc commandé un GLCD 128*64 via SPI > [dx.com] (lien à titre d'info, on peut trouver ce LCD en Fr > [www.gotronic.fr] ) et un encodeur rotatif STEC12E08 et un ti buzzer.....
j'ai donc cablé le LCD en SPI et l'encodeur en fonction des pin dans le pin.h de marlin et j'arrive à quelquechose de ce style:





l'afficheur GLCD fonctionne bien , l'encodeur rotatif marche bien, le beeper aussi, la carte SD (en extension) aussi, juste un peu de mal à faire fonctionner le contrast du menu Glcd sur mon Glcd. .....

si vous voulez le faire sur votre Melzi V2.0 il suffit de faire ça :


1. avoir le firmware marlin ( et le config pour sa printeuse)
2. faire cette modif dans le pin.h de marlin > remplacer les lignes de 1059 > 1097:

Quote

#ifdef ULTRA_LCD
#ifdef NEWPANEL
//we have no buzzer installed
#define BEEPER -1
//LCD Pins
#ifdef DOGLCD
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 29
// GLCD features
#define LCD_CONTRAST 1
// Uncomment screen orientation
// #define LCD_SCREEN_ROT_0
// #define LCD_SCREEN_ROT_90
#define LCD_SCREEN_ROT_180
// #define LCD_SCREEN_ROT_270
#else // standard Hitachi LCD controller
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#ifdef LCD_I2C_PANELOLU2
#ifdef MELZI
#define BTN_ENC 29 //the click switch
#define SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
#else
#define BTN_ENC 30 //the click switch
#endif
#else
#define BTN_ENC 16 //the click switch
#endif //Panelolu2
//not connected to a pin
#define SDCARDDETECT -1


par ces lignes de 1059 à 1105
Quote

#ifdef ULTRA_LCD
#ifdef NEWPANEL
//we have no buzzer installed
#define BEEPER -1
//LCD Pins
#ifdef DOGLCD
#ifdef U8GLIB_ST7920 //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
#define LCD_PINS_RS 30 //CS
#define LCD_PINS_ENABLE 29 //SID (MOSI)
#define LCD_PINS_D4 17 //SCK (CLK)
#define LCD_CONTRAST -1 // Contrast can be set with LCD menu, but I can't set it with GLCD 12864 ST7920, maybe the D27 (analog 4) pin can do this, I try, and never work.....
#define BEEPER 27 // Pin 27 is take by LED_Pin, but Melzi LED do nothing with Marlin and I take this pin for BEEPER.... See here > [github.com] , If you want use this pin with Gcode M42 instead BEEPER
// Pins for DOGM SPI LCD Support
#else
#define DOGLCD_A0 30
#define DOGLCD_CS 29
#define LCD_CONTRAST 1
#endif
// GLCD features
// Uncomment screen orientation
// #define LCD_SCREEN_ROT_0
// #define LCD_SCREEN_ROT_90
#define LCD_SCREEN_ROT_180
// #define LCD_SCREEN_ROT_270
#else // standard Hitachi LCD controller
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#ifdef LCD_I2C_PANELOLU2
#ifdef MELZI
#define BTN_ENC 29 //the click switch
#define SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
#else
#define BTN_ENC 30 //the click switch
#endif
#else
#define BTN_ENC 16 //the click switch
#endif //Panelolu2
//not connected to a pin
#define SDCARDDETECT -1

et décommenter la ligne #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER dans configuration.h

le reste c'est du cablage......

PS le GLCD vendu par reprapdiscount est pas compatible, le circuit imprimé est fait pour mettre le LCD en // et pas en SPI......y'a pas bcp de pin sur une melzi et les LCD en // demande trop de pin......

A+

Viewing all articles
Browse latest Browse all 39321

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>