Let the future tell the truth and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I really worked, is mine. (Nikola Tesla)

31/07/2010

●Flashing LEDs from Right to Left

Here is the program written by using CCS C.



#include <16f628.h>
#fuses NOPROTECT, NOWDT, NOLVP, NOMCLR INTRC_IO //Adding internal oscillator with INTRC_IO and MCLR makes possible to reset but with NOMCLR there is no need to connect anything that pin
#use delay(clock=4M)

void main(){
char a=128; //To define the first flashing LED
while(1){ // For an endless loop

output_b(a); // Defines which output's pin is going high and flashes the LED
delay_ms(250); //Delay the process to see the flash of a LED
if(a) a=a>>1; //To get high level at the output of the next pin
else a=128; //To start again from the first LED

}

}

28/06/2010

Text-to-Speech

If you want to have your text spoken by a human, this site offers you a program which is called as "Expressivo" copyrighted by IVO Software. Actually, it is a program that reads written text in a human voice. You can use it online at http://say.expressivo.com and even share the spoken text with your friends. Of course, there is a limitation and you can't enter more than 200 characters. But if you want to use it to listen to books, e-mails or RSS feeds, you can also buy it.

For instance;
You can listen the text typed as "Sezgin".

26/06/2010

● Alt Code Characters

You can type alternative characters which are not available in your current keyboard layout on a computer running Windows OS. By using the Alt key, you can enter any alt code which belongs to desired characterwith the keyboard's numeric keypad. Now, I will explain how you can do it:

1. Because of using the keyboard's numeric keypad, you should have your "Num Lock" opened.
2. You should press and hold down the "Alt" key.
3. Then, you should type the code which belongs to desired character.

For instance;

If we want to type symbol of degree sign (°), we should do the following.
The code for symbol of degree sign is ALT 248. So, we should press and hold down the "Alt" key. Then, type 248 using the numeric keypad. As you see, you will get the symbol of degree sign °.

21/06/2010

●Unit Conversion

http://www.unitconversion.org presents unit converters among different units of measurement. It is useful if your works mostly require unit conversions. It is free to use and also offer wide range of units of measurements differs from data storage conversion to frequency wavelenghts conversion. You can find all you want that you need during your working life or education. Bookmarking this site may be helpful. ;)

19/06/2010

What is bit.ly and j.mp for?

bit.ly is a URL shortener service which lets you to shorten, share and track your links. Especially that presents a kind of flexibility in twitter, cause there's character limitation in your tweets. Long URLs don't cause problem against this limitation. Beyond this, now there is a new service of bit.ly called j.mp. It has two less characters and same properties as bit.ly.



●Getting started to PIC Programming 2

How can we simulate our microcontroller?

I use Proteus,which is product of Labcenter, for PIC microcontroller simulation. By the aid of this program, you can check if your written program for PIC works properly or not. You don’t have to use a PIC Programmer to test your program. So, you can save your time, money and effort. All you should do is to right-click on your PIC in Proteus, select the .hex formatted file as source and start the simulation. So, all you need to have a compiler to create .hex formatted file and Proteus to simulate your program for PIC.

●Finding Average Score of Exams in C



int main(){

int rate1,rate2,rate3,score1,score2,score3;char a;int rate4,score4;int total,t1,t2,t3,t4;
printf("Is there any quiz/homework?\nIf Yes enter 'y' else 'n' and push enter\n");
a=getchar();
printf("\nEnter the first midterm's percantage ");
scanf("%d",&rate1);
printf("Enter the second midterm's percantage ");
scanf("%d",&rate2);
printf("Enter the final's percantage ");
scanf("%d",&rate3);
if(a=='y'){
printf("Enter the quiz/homework's percantage ");
scanf("%d",&rate4);}
printf("\nEnter the first midterm's score ");
scanf("%d",&score1);
printf("Enter the second midterm's score ");
scanf("%d",&score2);
printf("Enter the final's score ");
scanf("%d",&score3);
if(a=='y'){
printf("Enter the quiz/homework's score ");
scanf("%d",&score4); }

t1=0.01*rate1*score1;
t2=0.01*rate2*score2;
t3=0.01*rate3*score3;
t4=0.01*rate4*score4;

total=t1+t2+t3+t4;

printf("\nYour average score is %d\n\n",total);

}

ShareThis