News:

;) This forum is the property of Proton software developers

Main Menu

LCD DTPORT Customize DTPINs

Started by Abdullah, Apr 23, 2026, 05:29 PM

Previous topic - Next topic

Abdullah

HI everyone
I'm used Declare LCD_DTPin command
so how can to using customized data pins as per as my requiring pins
for example
LCD_Datapin.4 = PORTB.2
LCD_Datapin.5 = PORTB.3
LCD_Datapin.6 = PORTB.4
LCD_Datapin.7 = PORTC.0 
Abdullah

top204

#1
See page 279 or page 432 in the Positron8 compiler's manual.

There are Declares to indicate to the compiler what pins to use for the LCD's Data lines, if a whole Port, or a top or bottom nibble of a Port is not used for them:

'
' Setup the alphanumeric LCD
'
    Declare LCD_Data4_Pin = PORTB.2                 ' Connect PORTB.2 to the LCD's D4 line
    Declare LCD_Data5_Pin = PORTB.3                 ' Connect PORTB.3 to the LCD's D5 line
    Declare LCD_Data6_Pin = PORTB.4                 ' Connect PORTB.4 to the LCD's D6 line
    Declare LCD_Data7_Pin = PORTB.5                 ' Connect PORTB.5 to the LCD's D7 line
    Declare LCD_RSPin     = PORTB.0                 ' Connect PORTB.0 to the LCD's RS line
    Declare LCD_ENPin     = PORTB.1                 ' Connect PORTB.1 to the LCD's EN line
    Declare LCD_Interface = 4                       ' Tell the compiler to use a 4-wire interface to the LCD
    Declare LCD_Lines     = 2                       ' Tell the compiler that the LCD has 2 lines
    Declare LCD_Type      = Alphanumeric            ' Tell the compiler that the LCD is an alphanumeric Hitachi type

Regards
Les

Abdullah

Abdullah