Jump to content

DOG GLCD wiring diagram


eptheca
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 by philetaylor
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 1 month later...

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 by Antichambre
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...