Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Hi Jayanth
Lets say i just want to put the temperature at 25.3, so i will multiply by 10 to get 253.
unsigned float t=0;
val = ADRESH & 0xff;
t = ((val/255.0) * 500);
t = t *10; // 253
t = ?? // So how do i subtract 250 here since it wont be 250 everytime ...
Hi paulfjujo
I have got my LCD working now. I forgot the most impt TRISD out statement.
Thanks for the guidance.
Now im trying to make it look proper by trying to show the temperature as 25.x instead of just a whole number 25.
How am i able to do that ?
Hi paulfjujo
Yes, i am able to see "Hello World" when it is stored as a const rom char MESS[12] = "Hello World"
I am rather new to programming so my explanations may not be as clear and concise.
I seek your understanding but pls do guide me along. Thanks.
I will try out your short test when...
Hi paulfjujo
Pardon me for my ignorance on the ADC.
i have the following code for writing to the LCD as below:
/* Write text data in term of 4-bit at a time to LCD */
void W_data_4bit (char x)
{
LCD_RW = 0; // Logic ‘0’
LCD_RS = 1; // Logic ‘1’
LCD_TEMP = x; // Store text data...
Hi paulfjujo
i am using the 4-bit setup for the LCD so i cant use the full 10bits of ADC.
My setup is such that after i have the input from sensor, i will have a LCD function to process 4 bits by 4 bits and display it.
From my Watch window, i can see the correct display but it just cannot...
Thanks InNeedOfHelp.
I suppose you are using High Tech C compiler ?
I have still some difficulties. From my Watch viewer, i am able to get the temperature and its ascii code using itoa().
Now my problem is how do i write correctly the coding to display out these ascii code to the LCD.
I seems...
Are you able to help me with the coding ?
I have no idea where have the coding gone wrong as im not well versed in C++ and unfortunately the deadline for me is nearing and i have got to design a web page for this as well..
So your help is very much appreciated !!
Yes i did declare actually..
I put it in this >>>
ADCON0 = 0b00000001; // Select AN0 (channel 0) for Temp sensor, turn on ADC
is there anything that i have missed out ?
Thanks.
Attached is my schematic
Its an outdated one with a few pins reassigned as follows:
LCD module
RD0 >> DB4
RD1 >> DB5
RD2 >> DB6
RD3 >> DB7
Thanks, appreciated all help as im rushing before the deadline which is near and i have got to learn make a Web page out too..
Hi all,
Im new to C++ prog and i have a project which requires me using a 18f4520 with MPLAB IDE 8.80 and C18 compiler.
I have a LM35 which i will need to output the temperature value onto a 2x16 LCD.
Im using 18f4520 and making use of its ADC to do the conversion.
The problem now is that the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.