Monday, 20 February 2012
Wednesday, 15 February 2012
week 5: Low Cost Multipurpose Swimmer Helper Using PIC 16F877A
Those fortune enough to swim 50-metre pool don't have to count very many length in order to cover a reasonable distance. for example, just 20 length means that you have swum a kilometre. but even then, as you plough up and down the pool, it is pretty easy to get distracted and lose count. some people cope with the problem by swimming five length freestyle, five breast-stroke, five back-stroke and so on.
The problem is worse if you are swimming in a 25-metre pool (as many top-level swimmers regularly train in) and much worse in you're swimming in a small pool, which may be only 10 or 15 meters long. for a 10-metre pool, you need to do a 100 lengths to cover a kilometer.
it is impossible to trying to keep track of that many lengths in small pool while you swim back and forth is practically impossible. this is where Low Cost Multipurpose Swimmer Helper Using PIC 16F877A are applied. it will display the number of lengths that you have completed on a 2-digit readout, so you can let your mind wander, do a mental arithmetic or compose your new symphony while you swim up and down. this device also have an indicator light to help a swimmer to get ready to start. by using a LCD display, it make this device a friendly device.
This Low Cost Multipurpose Swimmer Helper Using PIC 16F877A consists of two small plastic boxes. one of the box contain the main circuit and the 2-digit readout. while the other one are contains the switch that the user have to push to count their lap.
The way it works is as follows. you place the switch at the far end of the pool (from where you normally start). before you dive on (or gingerly wade in) push the button once, ti will give 3 indicator light which is red (on your mark), yellow (get set), and green (go!!!), swim to the other end and push the button, where upon the display indicates '01'. congratulations, you have complied one lap.
This Low Cost Multipurpose Swimmer Healper Using PIC 16F877A also have a timer function. the timer function is to count how long the user can hold their breath. some style of swimming require you to dive, the longer you can dive is the better. before user dive, user have to push the button once, and this device will start to count the time. when user up to get the air, push once again. the time of user dive will be display on the LCD screen.
In some case, lifeguard did not notice that there are an accident. if suddenly your leg are cramped or you saw someone are drowning in water, you can push a panic button to call a lifeguard. logically, to compare the person who in the water and person that out of the pool, the person out of the pool are faster to get the drowning person
The problem is worse if you are swimming in a 25-metre pool (as many top-level swimmers regularly train in) and much worse in you're swimming in a small pool, which may be only 10 or 15 meters long. for a 10-metre pool, you need to do a 100 lengths to cover a kilometer.
it is impossible to trying to keep track of that many lengths in small pool while you swim back and forth is practically impossible. this is where Low Cost Multipurpose Swimmer Helper Using PIC 16F877A are applied. it will display the number of lengths that you have completed on a 2-digit readout, so you can let your mind wander, do a mental arithmetic or compose your new symphony while you swim up and down. this device also have an indicator light to help a swimmer to get ready to start. by using a LCD display, it make this device a friendly device.
This Low Cost Multipurpose Swimmer Helper Using PIC 16F877A consists of two small plastic boxes. one of the box contain the main circuit and the 2-digit readout. while the other one are contains the switch that the user have to push to count their lap.
The way it works is as follows. you place the switch at the far end of the pool (from where you normally start). before you dive on (or gingerly wade in) push the button once, ti will give 3 indicator light which is red (on your mark), yellow (get set), and green (go!!!), swim to the other end and push the button, where upon the display indicates '01'. congratulations, you have complied one lap.
This Low Cost Multipurpose Swimmer Healper Using PIC 16F877A also have a timer function. the timer function is to count how long the user can hold their breath. some style of swimming require you to dive, the longer you can dive is the better. before user dive, user have to push the button once, and this device will start to count the time. when user up to get the air, push once again. the time of user dive will be display on the LCD screen.
In some case, lifeguard did not notice that there are an accident. if suddenly your leg are cramped or you saw someone are drowning in water, you can push a panic button to call a lifeguard. logically, to compare the person who in the water and person that out of the pool, the person out of the pool are faster to get the drowning person
week 4: unfinished program for propose title
This program are build in PICC compiler
#include <16f877A.h>
#include <lcd.c>
#fuses HS,NOLVP,NOWDT,PUT
#use delay(clock=20000000)
#define GREEN_LED PIN_B2
#define YELLOW_LED PIN_B1
#define RED_LED PIN_B0
#define PUSH_BUTTON PIN_A0
#define PUSH_BUTTON2 PIN_A1
#define PUSH_BUTTON3 PIN_A2
void wait_for_one_press()
{ while(!input(PUSH_BUTTON)) ;
while(input(PUSH_BUTTON)) ; //Wait for one press
}
void light_one_led(int led)
{
output_high(RED_LED);
output_high(YELLOW_LED);
output_high(GREEN_LED);
switch(led)
{
case 0 : output_low(RED_LED); break;
case 1 : output_low(YELLOW_LED); break;
case 2 : output_low(GREEN_LED); break;
}
}
void main()
{ int count = 0;
{ wait_for_one_press();
light_one_led(0);
delay_ms(100);
light_one_led(1);
delay_ms(100);
light_one_led(2);
delay_ms(100);
{
while(TRUE)
{ output_c((count/10<<4)+(count%10));
delay_ms(5);
wait_for_one_press();
count++;
if(count>99)
count = 0;
}
}
void wait_for_one_press2( )
{ while(!input(PUSH_BUTTON2)) ;
while(input(PUSH_BUTTON2)) ; //Wait for one press
}
void main2( )
{ int count = 0;
lcd_init( );
while(TRUE)
{ lcd_putc("\fWelcome to my FYP\n");
printf (lcd_putc,"Count = %U",count);
delay_ms(250);
wait_for_one_press2( );
count++;
if(count>99)
count = 0;
}
}
#include <16f877A.h>
#include <lcd.c>
#fuses HS,NOLVP,NOWDT,PUT
#use delay(clock=20000000)
#define GREEN_LED PIN_B2
#define YELLOW_LED PIN_B1
#define RED_LED PIN_B0
#define PUSH_BUTTON PIN_A0
#define PUSH_BUTTON2 PIN_A1
#define PUSH_BUTTON3 PIN_A2
void wait_for_one_press()
{ while(!input(PUSH_BUTTON)) ;
while(input(PUSH_BUTTON)) ; //Wait for one press
}
void light_one_led(int led)
{
output_high(RED_LED);
output_high(YELLOW_LED);
output_high(GREEN_LED);
switch(led)
{
case 0 : output_low(RED_LED); break;
case 1 : output_low(YELLOW_LED); break;
case 2 : output_low(GREEN_LED); break;
}
}
void main()
{ int count = 0;
{ wait_for_one_press();
light_one_led(0);
delay_ms(100);
light_one_led(1);
delay_ms(100);
light_one_led(2);
delay_ms(100);
{
while(TRUE)
{ output_c((count/10<<4)+(count%10));
delay_ms(5);
wait_for_one_press();
count++;
if(count>99)
count = 0;
}
}
void wait_for_one_press2( )
{ while(!input(PUSH_BUTTON2)) ;
while(input(PUSH_BUTTON2)) ; //Wait for one press
}
void main2( )
{ int count = 0;
lcd_init( );
while(TRUE)
{ lcd_putc("\fWelcome to my FYP\n");
printf (lcd_putc,"Count = %U",count);
delay_ms(250);
wait_for_one_press2( );
count++;
if(count>99)
count = 0;
}
}
week 3: propose of new title
Low Cost Multipurpose Swimmer Helper Using PIC 16F877A
>>>Features
- Lap counter
- breath hold timer
- S.O.S. system for life guard
>>>Circuit Design
- Clock for ic
- Insert reset button
- Switches
- Led (on your mark, get set, go!!!!)
- 7-segment for Lap Counter
- LCD display for welcome display and timer
- Labeling the circuit
>>>Features
- Lap counter
- breath hold timer
- S.O.S. system for life guard
>>>Circuit Design
- Clock for ic
- Insert reset button
- Switches
- Led (on your mark, get set, go!!!!)
- 7-segment for Lap Counter
- LCD display for welcome display and timer
- Labeling the circuit
week 2:: problem
problem on circuit design
i had try to design the circuit, but i did knot know how to design
- what is the input
- how to get the input
- how to generate input
- it is different from the example; on example the IC is 18f132ML
on program i did know how to start
- how to initialize
- how to determine the input
Subscribe to:
Posts (Atom)