0% found this document useful (0 votes)
11 views2 pages

Llakjsldkj

The document defines constants for connecting an LCD display to a microcontroller over several I/O pins and initializes the LCD display and UART communication.

Uploaded by

Ivan Rodríguez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Llakjsldkj

The document defines constants for connecting an LCD display to a microcontroller over several I/O pins and initializes the LCD display and UART communication.

Uploaded by

Ivan Rodríguez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

sbit LCD_RS at RB0_bit;

sbit LCD_EN at RB3_bit;

sbit LCD_D4 at RB4_bit;

sbit LCD_D5 at RB5_bit;

sbit LCD_D6 at RB6_bit;

sbit LCD_D7 at RB7_bit;

sbit LCD_RS_Direction at TRISB0_bit;

sbit LCD_EN_Direction at TRISB3_bit;

sbit LCD_D4_Direction at TRISB4_bit;

sbit LCD_D5_Direction at TRISB5_bit;

sbit LCD_D6_Direction at TRISB6_bit;

sbit LCD_D7_Direction at TRISB7_bit;

int i=1,ii=0;

char registro;

void main() {

Lcd_init();

Lcd_cmd(_LCD_CLEAR);

Uart1_Init(9600);

delay_ms(100);

while(1){

if(Uart1_Data_Ready()){

ii++;

registro = Uart1_Read();

Uart1_Write(registro);

Lcd_chr(i,ii,registro);

if(ii == 16 && i == 2){

ii=0;

i=1;
Lcd_cmd(_LCD_CLEAR);

if(ii == 16){

i=2;

ii=0;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy