Search found 246 matches

by Nandika
Mon Jan 21, 2013 9:03 pm
Forum: C/C++ Programming
Topic: How to convert binary to BCD ?
Replies: 13
Views: 27739

Re: How to convert binary to BCD ?

Hello, No problem in Rksk explanation..I soundly understood it. :) Shifting system was the problem. Now,It,s clear. Thank you Rksk. Now I have big question.It originated from Saman's Integer to BCD function. I want to convert Binary to BCD.... according to Saman's function,First I convert binary to ...
by Nandika
Mon Jan 21, 2013 6:02 am
Forum: C/C++ Programming
Topic: How to convert binary to BCD ?
Replies: 13
Views: 27739

Re: How to convert binary to BCD ?

Thank you Saman ... :D Now I can write a new function for binary to BCD. 75% is your. ;) unsigned int i2bcd(unsigned int bits[]) { unsigned int i=0; unsigned int pos_val=0; unsigned int dec=0; unsigned int binaryShift = 1; unsigned int digit; unsigned int bcd = 0; for(i=0;i<7;i++)//i have 8bit binar...
by Nandika
Sun Jan 20, 2013 11:06 pm
Forum: C/C++ Programming
Topic: How to convert binary to BCD ?
Replies: 13
Views: 27739

How to convert binary to BCD ?

Hi Friends, :)

I wan to write a function using C for convert 8bit dip switch values to BCD.
As I think dip switch value is binary.
I coded some function.But,It's binary to decimal. :(
I tried with "itoa" function.No valuable result. :cry:

Please anyone help me.
by Nandika
Mon Dec 03, 2012 1:17 am
Forum: Electronics & Electrical Engineering
Topic: LED ?????? ??? ???? ???? ?? ????? ?????
Replies: 7
Views: 8570

Re: LED ?????? ??? ???? ???? ?? ????? ?????

nipunalanka, mehemane... mama mulinma duty cycle 1 gana kiyannamko... api yam square wave 1k gaththahama aoita e wavw eke uparima(max) saha awama(min) agayak balanna puluwan... min max of square wave.png namuth me wave ekedi yam karyayak(Duty) karanne uparima agaya witharai...api duty cucle kiyanne ...
by Nandika
Sun Nov 04, 2012 10:50 pm
Forum: Arduino
Topic: Help to Control a Fan speed according to temperature.
Replies: 4
Views: 6132

Help to Control a Fan speed according to temperature.

Hello Friends, I have a Arduino Duemilanove board ... :D I want to control a AC fan using it according to room temperature. I am beginner(actually I saw a Arduino in first time ... :shock: ) I know something about PIC. ADC,PWM ... but,I cant create my program :x :cry: Please anyone help me soon ... ...
by Nandika
Wed Oct 31, 2012 2:57 pm
Forum: C/C++ Programming
Topic: How can I get different types output in C?
Replies: 7
Views: 12235

Re: How can I get different types output in C?

Thank you Herath for your reply... :)
by Nandika
Fri Oct 26, 2012 11:37 pm
Forum: Microcontrollers
Topic: Micro-controllers for day-to-day life (Sinhala Medium)
Replies: 8
Views: 14705

Re: Micro-controllers for day-to-day life (Sinhala Medium)

high speed ?????? high speed? ????? ?????? pdf ??? zip ???? ??? attach ?????? ????? logo.png ?? ?? ??? ??...???? ???????. ?? ??? WinRar ????? ???? ???? 4share ??? ????? ???.. File size:-27.0 MB Contents:-85 pdf and one png image Uploaded date:-10/26/2012 Download Link:- http://www.4shared.com/rar/I...
by Nandika
Fri Oct 26, 2012 10:48 pm
Forum: C/C++ Programming
Topic: How can I get different types output in C?
Replies: 7
Views: 12235

Re: How can I get different types output in C?

Thank you Neo....
Now fully clear my problem . :)

This code also work well,

Code: Select all

#include<stdio.h>

int main(){
	float a=5;
	float b=2;
	float c;
	c=a/b;
	printf("%f",c);
	return(0);
	
}
by Nandika
Wed Oct 24, 2012 2:24 pm
Forum: C/C++ Programming
Topic: How can I get different types output in C?
Replies: 7
Views: 12235

Re: How can I get different types output in C?

ok Now I have a Solution .... cording was modified as this, #include <stdio.h> int main(){ float f; f=5.0/2.0; printf ("%f",f); } As I think, My assumption is, This is a Compiler's misunderstand...(it is so mad :lol: ) :idea: :idea: :idea: My opinion is, if number is wrote as 5 compiler get it as an...
by Nandika
Wed Oct 24, 2012 11:19 am
Forum: C/C++ Programming
Topic: How can I get different types output in C?
Replies: 7
Views: 12235

How can I get different types output in C?

Hello Friends, I coded small program using C (with C Free 5) #include <stdio.h> int main(){ float f; f=5/2; printf ("%f",f); } Print result is 2.000000 :?: What is the error in my code? I wished 2.5 :( I already found some about printf() command.according to this table. table1.PNG Cant I use this Co...

Go to advanced search