eptheca Posted July 8, 2013 Report Posted July 8, 2013 Can anyone help me with a wiring diagram for the DOG GLCD for MIOS 8 Core I can only find one for the CLCD's If I understand it correctly I need 9 caps and a resistor to reduce the 5V to about 3V Does the GLCD also need a 4.7K Pull-Down? and I use this driver? http://svnmios.midib.../app_lcd/dog_g/ thanks in advance Quote
Shuriken Posted July 8, 2013 Report Posted July 8, 2013 I think this post from Phil has the diagram. Don't forget to read his comment as there is a mistake in the picture. Quote
eptheca Posted July 10, 2013 Author Report Posted July 10, 2013 I use the EA DOGM 128-6, it's a little smaller than the DOGL do I need to change anything? It looks to me as the icons and characters are a bit "squashed" Quote
philetaylor Posted July 11, 2013 Report Posted July 11, 2013 No that looks fine to me, it's still 128x64. The large GLCD font is a bit squashed anyway, it looks just like my DOG-L displays! Thanks Phil Quote
eptheca Posted July 12, 2013 Author Report Posted July 12, 2013 I looked in the papers from EA, and the DOGM pixels are 0,42x0,36 mm, DOGL 0,50x0,46 mm I made some custom icons, and a square icon that's 24 pixels high, needs to be 28 pixels wide to look square Thanks for the driver Phil, these displays are great :) I am no programmer, but is it possible to change the pins it uses? I have an application that uses PORTB pins 5,6,7, can I move them to PORTD pins in the driver? I will only use one display Quote
philetaylor Posted July 15, 2013 Report Posted July 15, 2013 (edited) Yes it's technically possible to change the pins but you would need to hack the "universal" app_lcd.c. I will warn you though, that isn't for the faint hearted! Cheers Phil Sorry I just read your message again, I didn't realise you were using the PIC version. That should be easier as all of the pins are defined in app_lcd.inc you should just be able to change the pin assignments. You will need to check that they aren't being used by anything else first though! Edited July 15, 2013 by philetaylor Quote
eptheca Posted July 22, 2013 Author Report Posted July 22, 2013 OK, Is it enough to change this part of app_lcd.inc ? ;; Clock/data/DC USER_LCD_LAT_SCLK EQU LATD ; Pin D.7 USER_LCD_PIN_SCLK EQU 7 USER_LCD_LAT_SDA EQU LATD ; Pin D.6 USER_LCD_PIN_SDA EQU 6 USER_LCD_LAT_DC EQU LATD ; Pin D.5 USER_LCD_PIN_DC EQU 5 ;; Chip Select Lines 0-7 USER_LCD_LAT_CS EQU LATB ; Pin B.7 .. B.0 USER_LCD_PIN_D0 EQU 7 USER_LCD_PIN_D1 EQU 6 I use a PIC18F4685, and this test app http://ucapps.de/mios/lcd7_dog_g_v1a.zip I have tried different combinations of the ports and pins, but can't get it to work The pins I have free in my other application is A 0-3 and B 0-3 Quote
TK. Posted July 22, 2013 Report Posted July 22, 2013 You probably have to change the appr. TRISA and TRISB registers to enable output mode for the used pins. For Port A, it could also be, that the ADC has to be disabled to use the pins as IO. This can be done with ADCON1 = 0x07 (for PIC18F452) resp. ADCON1 = 0x0f (for newer PICs) Best Regards, Thorsten. Quote
eptheca Posted July 25, 2013 Author Report Posted July 25, 2013 I have tried some different things now, but can't get it to work I have moved all 4 pins to PORTB SCLK on 3 SDA on 2 DC on 1 CS on 0 and added these lines in app_lcd.inc ;; Clock/data/DC USER_LCD_LAT_SCLK EQU LATB ; Pin D.7 USER_LCD_PIN_SCLK EQU 3 USER_LCD_LAT_SDA EQU LATB ; Pin D.6 USER_LCD_PIN_SDA EQU 2 USER_LCD_LAT_DC EQU LATB ; Pin D.5 USER_LCD_PIN_DC EQU 1 USER_LCD_TRI_PORT EQU TRISB ; Port Direction ;; Chip Select Lines 0-7 USER_LCD_LAT_CS EQU LATB ; Pin B.7 .. B.0 USER_LCD_PIN_D0 EQU 0 USER_LCD_ShiftByte clrf USER_LCD_TRIS_PORT ;;; the modification(just clear TRISB for Output direction port) any suggestions? Quote
Antichambre Posted September 22, 2013 Report Posted September 22, 2013 (edited) Yes! Clear the TRIS register in each LCD Command, before each PIN_DC toggling in :- LCD_Data, - LCD_Cmd, - LCD_Clear. before: bsf USER_LCD_LAT_DC, USER_LCD_PIN_DC or bcf USER_LCD_LAT_DC, USER_LCD_PIN_DC And Shiftbyte MACRO will follow... ;) Edited September 22, 2013 by Antichambre Quote
Antichambre Posted September 22, 2013 Report Posted September 22, 2013 (edited) It's a little more complex If you use only PORTB ! cause of the CS Pin in LCD_Data. In the setup ASM files: after: #define DEFAULT_IS_CARTRIDGE x add ;; here you can change Serial DOG LCD connection pins ;; for Cartridge version #if DEFAULT_IS_CARTRIDGE ;; Clock/data/DC #define USER_LCD_TRIS_SCLK TRISB #define USER_LCD_LAT_SCLK LATB ; Pin B.3 #define USER_LCD_PIN_SCLK 3 #define USER_LCD_TRIS_SDA TRISB #define USER_LCD_LAT_SDA LATB ; Pin B.2 #define USER_LCD_PIN_SDA 2 #define USER_LCD_TRIS_DC TRISB #define USER_LCD_LAT_DC LATB ; Pin B.1 #define USER_LCD_PIN_DC 1 ;; Chip Select Lines #define USER_LCD_TRIS_CS TRISB #define USER_LCD_LAT_CS LATB ; Pin B.3 .. B.0 #define USER_LCD_PIN_CS0 0 ;;#define USER_LCD_PIN_CS1 2 ;;#define USER_LCD_PIN_CS2 1 ;;#define USER_LCD_PIN_CS3 0 #endif Up to 4 LCD in base version. Up to 4 LCD in cartridge version except if you use only PORTB(for SER and CS), in this case CS0 only defined. The modified app_lcd.inc file for use with a 4685 in midibox_tia FW base and cartridge version. app_lcd.inc Edited September 22, 2013 by Antichambre Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.