Mikroc, Making it simple, Page – ABL electronic PIC Microcontrollers PIC16 User Manual

Page 214: Data port control port, Portb is output, Portc is output, Initialize lcd at portb and portc, Turn off cursor, Print text on lcd

Advertising
background image

mikroC - C Compiler for Microchip PIC microcontrollers

mikroC

making it simple...

206

MikroElektronika: Development tools - Books - Compilers

page

Library Example (default pin settings)

Hardware Connection

char

*text = "mikroElektronika";

void

main() {

TRISB = 0;

// PORTB is output

TRISC = 0;

// PORTC is output

Lcd8_Init(&PORTB, &PORTC);

// Initialize LCD at PORTB and PORTC

Lcd8_Cmd(Lcd_CURSOR_OFF);

// Turn off cursor

Lcd8_Out(1, 1, text);

// Print text on LCD

}

1

R/W

D4

E

RS

D3

D2

D1

D0

D7

D6

D5

Vee

Vdd

Vss

+5V

LC

D

c

ont

ra

s

t

PIN1

PIN7

PIN0

PIN6

PIN5

PIN4

PIN3

PIN2

PIC MCU

any port (with 8 pins)

m i k r o e l E k t r o n i k a

Data Port

Control Port

PIN0

PIN3

PIN2

RS

E

R/W

Advertising
This manual is related to the following products: