Jump to content

Where to set Pins for multiple LCDs?


ReinerS
 Share

Recommended Posts

Hello all,

I read through a bunch of documentation and source files, but somehow cannot figure it out:

I want to use three 2x16 character LCDs, so I understand I need to include the clcd_multi driver and I can use any free PIC pins for the enable lines. Since I am using analog inputs (not multiplexed) and no motorfaders it seems to me that RC1, RC2 and RC3 might be good cancidates.

What I cannot figure out is which file do I need to edit to tell the driver which pins to use?

Also, when using this driver, what happens with the standard LCD available in Mios? Is that disabled then?

Many thanks for your guidance!

Reiner

Link to comment
Share on other sites

Hi Reiner,

22 hours ago, ReinerS said:

What I cannot figure out is which file do I need to edit to tell the driver which pins to use?

It's in the app_lcd.inc file
 

#ifndef USER_LCD_NUM_ENABLE_LINES
#define USER_LCD_NUM_ENABLE_LINES	8
#endif

#ifndef USER_LCD_LAT_E0
USER_LCD_LAT_E0	EQU     LATD		; Pin D.7
#endif
#ifndef USER_LCD_PIN_E0
USER_LCD_PIN_E0	EQU     7
#endif

#ifndef USER_LCD_LAT_E1
USER_LCD_LAT_E1	EQU     LATC		; Pin C.5
#endif
#ifndef USER_LCD_PIN_E1
USER_LCD_PIN_E1	EQU     5
#endif

#ifndef USER_LCD_LAT_E2
USER_LCD_LAT_E2	EQU     LATC		; Pin C.4
#endif
#ifndef USER_LCD_PIN_E2
USER_LCD_PIN_E2	EQU     4
#endif

I suppose you have to change the number of LCD from 8 to 3
Then change PORT and PIN for the 3 first lines E0 to E2.
 

22 hours ago, ReinerS said:

Also, when using this driver, what happens with the standard LCD available in Mios? Is that disabled then?

I never tried it so I don't know, but I think the first one is selected at startup, so first lcd should work normally.
In your app you have to use USER_LCD_Select to select another LCD.

More information are in the README file

Have a good day!
Bruno

Edited by Antichambre
  • Like 1
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...