EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies /  char uart_rd;char

 char uart_rd;char

|

Projects › Projects › PIC16F877 and GPS module (EM-406A) ›  char uart_rd;char

June 19, 2012 at 12:57 pm #8078
midhun
Participant

 

char uart_rd;
char uart[11];
 
// LCD module connections
sbit LCD_RS at LATB2_bit;
sbit LCD_EN at LATB3_bit;
sbit LCD_D4 at LATB4_bit;
sbit LCD_D5 at LATB5_bit;
sbit LCD_D6 at LATB6_bit;
sbit LCD_D7 at LATB7_bit;
 
sbit LCD_RS_Direction at TRISB2_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;
// End LCD module connections
 
void main() {
  TRISB = 0;
  PORTB = 0x00;
 
  UART1_Init(4800);              // Initialize UART module at 9600 bps*******************************************UART1_Init(9600);
  Delay_ms(3000);                 // Wait for UART module to stabilize
 
  //UART1_Write_Text(“Start”);// not required, you only receive data. dont send any.
  Lcd_Init();                        // Initialize LCD
  Lcd_Cmd(_LCD_CLEAR);                // Clear display
  Lcd_Cmd(_LCD_CURSOR_OFF);           // Cursor off
 
  lcd_out(1,1,”lcd”); why to display “LCD”?
  delay_ms(1000);
 
  uart1_write(0x08);// why writing this???? remove it.
  delay_ms(5000);// not required.
  while(1) {
      
     delay_ms(2000);
     delay_ms(10000);/// together you can write it asdelay_ms(12000);
     if(UART1_Data_Ready()) {      // If data is received,
     uart_rd=uart1_read();
                                               //  gps_value=gps_data(GPS_LATHIGH);
     lcd_chr(2,12,uart_rd);
     uart1_read_text(uart, “.”, 15);
     lcd_out(1,5, uart);
     delay_ms(500);
  }
  }
}
 
 
just try it nw….
BEST OF LUCK.
 

RSS Recent Posts

  • Do i need a buffer? February 7, 2026
  • ANOTHER OLD PROJECT REDO February 7, 2026
  • wall transformer polarity February 7, 2026
  • Supply vs performance query February 7, 2026
  • BPF February 7, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise