Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

neeed help plzzzzz seriously

Status
Not open for further replies.

amrahmed

New Member
hye brothers
seriously i need a help with my project
i want to make temprature sensor with lcd 16x2 by using pic16f877a and the reading send over max232 through serial port and take the reading from the pc
so plzz brother if anyone can help me
with the code in mikroC
and the whole circuit and the programe that i can use to get the received reading

iam thankful
 
i do the the circuit with the lcd and the pic and connect them with the max232
but what i got is just the reading on the lcd i couldnt get it from the pc
but my max232 i used it to send numbers or letter to the lcd through the pc by using mikroc tool usart terminal so thas mean that the max works well
 
this is my code

/ LCD Pinout settings
sbit Lcd_RS at RB0_bit;
sbit lcd_En at RB1_bit;
sbit lcd_D4 at RB2_bit;
sbit lcd_D5 at RB3_bit;
sbit lcd_D6 at RB4_bit;
sbit lcd_D7 at RB5_bit;
// Pin direction
sbit lcd_RS_Direction at trisb0_bit;
sbit lcd_En_Direction at trisb1_bit;
sbit lcd_D4_Direction at trisb2_bit;
sbit lcd_D5_Direction at trisb3_bit;
sbit lcd_D6_Direction at trisb4_bit;
sbit lcd_D7_Direction at trisb5_bit;
int temp1;
char temp[10];
void adc(){
temp1=ADC_READ(0);
temp1=temp1*0.245*2;
INTToStr(temp1,temp);}
void main() {
TRISA = 0xFF;
TRISD=0;PORTD=0;
TRISB=0;PORTB=0;
TRISc=1;PORTc=0;
Uart1_init(9600);
Lcd_Init();
lcd_cmd(_LCD_CURSOR_OFF);
while (1) {
lcd_out(1,10,temp);
UART1_Write_Text("temperature");
UART1_Write_Text(temp);UART1_Write(13);UART1_Write(10);;Delay_ms(1000);;
adc();
} }
 
Status
Not open for further replies.

Latest threads

Back
Top