51 Threads found on edaboard.com: Float Lcd
unsigned int PWM_DUTY_OC1 = 0, PWM_DUTY_OC2 = 0, PWM_DUTY_OC3 = 0, PWM_DUTY_OC4 = 0, PWM_DUTY_OC5 = 0, PWM_DUTY_OC6 = 0;
float PWM_FREQUENCY_OC1 = 0, PWM_FREQUENCY_OC2 = 0, PWM_FREQUENCY_OC3 = 0, PWM_FREQUENCY_OC4 = 0, PWM_FREQUENCY_OC5 = 0, PWM_FREQUENCY_OC6 = 0;
float lcd_DUTY_1 = 0, lcd_DUTY_2 = 0;
signed int (...)
Microcontrollers :: 03-19-2016 17:25 :: kushal nandanwar :: Replies: 0 :: Views: 391
You need to use a conversion function like sprintf(...) to convert the float value to an ascii characterstring in a buffer. You can then write the contents of the buffer to the lcd.
Microcontrollers :: 10-18-2015 11:14 :: Gorgon :: Replies: 9 :: Views: 1271
Now both variable are declared as float and I apply your code the answer is strange am attaching the image that what i get after applying the code. my expactation was 2.500 but the lcd displayed 159.843
Microcontrollers :: 09-19-2015 08:06 :: farrukhtalib :: Replies: 3 :: Views: 946
I want to make array of 20 buttons.such that i sud be able to know which button was pressed at what time!
intially i was usiing digital pins of arduino,but it is giving me float value with no proper reading.what sud i do??
You'll have to use pull-up or down resistors to solve the floating problem. Maybe you a
Microcontrollers :: 06-13-2015 20:55 :: notionSunday :: Replies: 2 :: Views: 839
Hi everybody!
I am using the Mikroc compiler with PIC18F2550 and simulating with Proteus.
I want to print a float value in lcd. It is a current value from the ACS712 hall sensor, but it is not working. The lcd doesn't show anything.
The part of the code to display the information is below. If I forgot some important information, please (...)
Microcontrollers :: 06-10-2015 01:50 :: stip :: Replies: 10 :: Views: 983
problem in displaying on lcd is that it slows down decrementing my duty.
unsigned int adc_data;
unsigned char analog_selected = 0;
unsigned char str;
unsigned short duty1=255;
float form1;
// lcd Module connections
sbit lcd_RS at RD0_bit;
sbit lcd_EN at RD1_bit;
sbit lcd_D7 at (...)
Microcontrollers :: 03-22-2015 12:11 :: mugheesnawaz :: Replies: 2 :: Views: 700
You have to use float or double type variables and use floatToStr() function. I have answered to a similar question in your another thread.
I have fixed the code as you need. I have tested in Proteus 8.1
Microcontrollers :: 09-24-2014 05:31 :: milan.rajik :: Replies: 4 :: Views: 610
you can declare t and max as global
because you use it in other functions
to reduce consumption of RAM.
another function to transfor float to ascii
unsigned char *float2Ascii (float x, unsigned char *str,char precision)
{
/* converts a floating point number to an ascii string */
/* x is stored into str, which should (...)
Microcontrollers :: 06-07-2014 14:30 :: paulfjujo :: Replies: 7 :: Views: 2662
You have to use Potentiometic float or eTape for sensing the liquid level. Check what ADC value you get for water low and high levels for Over Head Tank and water low level for SUMP. Two ADC channels are needed. If water in SUMP is not low and water in Over Head Tank (OHT) is low then turn ON pump. If water in OHT is high then turn OFF pump.
[synt
Microcontrollers :: 05-17-2014 03:41 :: milan.rajik :: Replies: 1 :: Views: 1127
Dear All,
I am facing problem in below code. Please refer below.
void main()
{
int data;
unsigned int b,c,d,z=0,e,i,f,a,x,p=0,g,h,j,k,l,o,q;
unsigned int v;
float t=0;
long long m,n;
PORTD=0x00;
PORTC=0x00;
PORTB=0x00;
TRISD = 0x00;
TRISB = 0x00;
TRISC = 0x00;
ADC_Init();
f = ADC_Re
Microcontrollers :: 02-27-2014 05:58 :: ecaits :: Replies: 3 :: Views: 922
Hi friends,
I want to display float value on lcd display in PIC16F877 using Hi-tech C compiler.
Can anybody help me???
Microcontrollers :: 02-18-2014 04:44 :: ecaits :: Replies: 4 :: Views: 4902
hello,
I did some comparative test with
void Energydisplay(double V):
void floatTolcd(float fval);
unsigned char *fltToa (float x, unsigned char *str,char precision)
and the result is clear, only the third function is OK
the other can give wrong ( garbage) results.
Even test is made with Uart output instead of (...)
Microcontrollers :: 01-08-2014 16:55 :: paulfjujo :: Replies: 8 :: Views: 846
convert float into string and then send to lcd...
use "sprintf" function if you are writing code in C language...
Microcontrollers :: 01-03-2014 11:41 :: peeyushsigma :: Replies: 2 :: Views: 1289
Hi! I want to display a float value with more than 4 decimal points on the lcd display. I'm using MikroC pro. I tried floattostr function but it only displays one decimal point. After that it shoes like ' e-2'. The sprintf function is also not available since I'm using PIC16F887.
Microcontrollers :: 01-02-2014 07:30 :: ADGAN :: Replies: 26 :: Views: 7517
hello,
sin(x)
x in degrés 0 to 360 or radiant x* PI/180 ?
i don't know your type of lcd,but you can try this:
maybe include also a library link "math.h"
char x1,y1 = 0;
float x,y;
do
{
x= (float)x1;
y=sin(x)*30.0+32.0; // offest 32 and range +-30 around the offset
y1=(int)y;
T6963C_line(x1, 32, x1,y1, T6963C_WHITE); // this
Microcontrollers :: 09-23-2013 08:16 :: paulfjujo :: Replies: 6 :: Views: 791
Can you plz help me to print on the lcd an index of any number after comparison of the following arrays;the pic is reading a frequency on its TICK1 of PIC16F877A and then that value is compared in those two arrays and print the index on the screen.
void final()
{
const float lo_limit = {1,2,3,4,5,6,7,8,70,85};
const float hi_limi
Microcontrollers :: 05-16-2013 15:18 :: john120 :: Replies: 53 :: Views: 3886
I have written pgm in mkroc for energy calculation..using PIC16f877a
can you convert it to mplab??
i dont knw mplab..its lcd&adc initializtion..
[HTMLunsigned float adcval,adcval1,V1,Is,I,I1,Is1,power,energy;
char val;
void main()
{
energy = 0;
TRISA=0XFF;
TRISD=0X00;
ADCON1=0X80;
lcd_init(&PORTD); (...)
Microcontrollers :: 04-24-2013 00:59 :: swethamenon :: Replies: 2 :: Views: 1177
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "Mrlcd.h"
void Stepper_Motor_CW(void);
void Stepper_Motor_CCW(void);
void Initialize_ADC(void);
v
Elementary Electronic Questions :: 02-26-2013 05:33 :: subrata_009 :: Replies: 3 :: Views: 1184
use a variable as float and display it on lcd.
Microcontrollers :: 02-20-2013 10:20 :: hemnath :: Replies: 3 :: Views: 661
float y,rtdr,temp;
char opr;
y = 0.15274- (rtdr-100.0)*2310.0e-7;
if(y>= 0)
y= sqrt(y);
temp = (y-0.39083)/(-0.0001155) ;
floatToStr(temp,opr);
lcd_Out(1,1,lcd);
lcd_Out(1,1,lcd);
Where did you get this "lcd" variable?
floatToStr(temp,opr[/
Elementary Electronic Questions :: 02-12-2013 18:51 :: Tahmid :: Replies: 2 :: Views: 2443