caramoan tour package

caramoan tour package

Author Topic: Help naman po sa Source code!  (Read 1263 times)

Offline BANNEDMemberAccount

  • Gas Turbine
  • **
  • Posts: 2747
  • Pogi/Ganda Points: 130
  • You have No GOD?, You have No Peace of mind.
    • Hay tita lengwahe mo bading na bading halata na talaga, napaka-awkward! gack!!!
Re: Help naman po sa Source code!
« Reply #20 on: March 14, 2010, 10:47:56 PM »
baket kaizer rin ang name mo ? :) hala ka :)
Wag HIHITHIT ng Katol para hinde Tamang Hinala  Account is permanently BANNED due to Accumulation of forum rules and violations.

Philippine Electronics Forum

Re: Help naman po sa Source code!
« Reply #20 on: March 14, 2010, 10:47:56 PM »

Offline marcelino

  • Moderator
  • Solar Power Satellite
  • *****
  • Posts: 6028
  • Pogi/Ganda Points: 258
  • ...keep moving forward! - Robinson's
Re: Help naman po sa Source code!
« Reply #21 on: March 14, 2010, 10:54:11 PM »
oo nga...

bakit, gumigiling ka din? heheh ;D
"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"

Philippine Electronics Forum

Re: Help naman po sa Source code!
« Reply #21 on: March 14, 2010, 10:54:11 PM »

Offline BANNEDMemberAccount

  • Gas Turbine
  • **
  • Posts: 2747
  • Pogi/Ganda Points: 130
  • You have No GOD?, You have No Peace of mind.
    • Hay tita lengwahe mo bading na bading halata na talaga, napaka-awkward! gack!!!
Re: Help naman po sa Source code!
« Reply #22 on: March 14, 2010, 11:01:47 PM »
hala lagot ka  :)
Wag HIHITHIT ng Katol para hinde Tamang Hinala  Account is permanently BANNED due to Accumulation of forum rules and violations.

Philippine Electronics Forum

Re: Help naman po sa Source code!
« Reply #22 on: March 14, 2010, 11:01:47 PM »

Offline kaizer002

  • CR2032 Battery
  • **
  • Posts: 43
  • Pogi/Ganda Points: 0
Re: Help naman po sa Source code!
« Reply #23 on: September 22, 2010, 06:42:50 PM »
Up thread ko lang po..

gusto ko lng po i-enhance yung ginawa kong timer...

24-hour setting po siya..

00:00:01 => 00:00:59

then, 00:01:00 => 00:59:59

then, 01:00:00 => 23:59:59 => 00:00:00

imbes na timer lang, gagawin ko na pong digital clock na naseset yung time. (hr/min/sec)..

pa-help naman po sa source code..

Yung timer din po, lalagyan ko rin sana ng switches para magreset at magstart ulit.

Paano po ba? Eto na po yung working schematic and source code:

Schematic:



Code:

Code: [Select]
#include <16f877.h>
#fuses XT,NOLVP,NOWDT,PUT
#use delay (clock=4000000)   // defind crystal = 4MHz
#byte port_b=8
#byte port_c=5
byte CONST LED_MAP[10]={0x3F,0x06,0x5b,0x4F,0x66,0x6D,0x7D,0x07,0X7F,0x6F};

//===========================================
// this function use to display number 00=99
// input : n = number to display
//===========================================


void display_number(int32 n)
{

 output_b(LED_MAP[n/36000%24]);  //hour
   output_low(PIN_C5);
   delay_ms(1);
   output_high(PIN_C5);
   output_b(LED_MAP[n/3600%600]);
   output_low(PIN_C4);
   delay_ms(1);
   output_high(PIN_C4);

  output_b(LED_MAP[n/600%6]); //minutes
   output_low(PIN_C3);
   delay_ms(1);
   output_high(PIN_C3);
   output_b(LED_MAP[n/60%10]);
   output_low(PIN_C2);
   delay_ms(1);
   output_high(PIN_C2);

   output_b(LED_MAP[n/10%6]); //seconds
   output_low(PIN_C1);
   delay_ms(1);
   output_high(PIN_C1);
   output_b(LED_MAP[n%10]) ;
   output_low(PIN_C0);
   delay_ms(1);
   output_high(PIN_C0);
}
 //============================================
// main program
//============================================
 main()
{
   int32 i,count=0;

while(1)
  {
      for (i=0;i<=2;i++)
         display_number(count);      // dispay 200 times
         count=(count==84600) ? 0: count+1;//count+1=++count


   }
}

Philippine Electronics Forum

Re: Help naman po sa Source code!
« Reply #23 on: September 22, 2010, 06:42:50 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com