caramoan tour package

caramoan tour package

Author Topic: 1diy group design & Learn Product Development - 100Wrms Power Amplifier  (Read 9756 times)

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #80 on: November 16, 2011, 08:02:25 AM »
Sige sir just inform me kung kailan sya available. Malamang kasi oorder ako ng GSM module sa inyo saka yung RF remote na 4 channels (baka meron kayong 8 channels?)

Basically, Ok na ang DR100W_EQ, may kaunting aayusin lang sa PCB, inaayos pa namin sa mga gustong mag-avail ng hardware, kung hindi naman,  the schematic is  there, puwede na gamitin for experimentation.    Noted iyong hardware na gusto mong i-avail.  Salamat.

Philippine Electronics Forum

Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #80 on: November 16, 2011, 08:02:25 AM »

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #81 on: November 16, 2011, 08:05:49 AM »
<reserved for updated scheamtic and specification for posted soon>

1.  Technical Project Definition
2.  Schematic Diagram

With the DR100W_EQ Hardware finished,  let's see the software point of view,  dedicated for those Audio Hobbyist who might want to  customized the software for this project, para po sa mga nagsisimulang mag-aral ng MCU.

Philippine Electronics Forum

Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #81 on: November 16, 2011, 08:05:49 AM »

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #82 on: November 16, 2011, 08:11:10 AM »
Writing the Program:
Absolutely for beginners with zero background in MCU Programming -  advance Users are encourage to participate to expound the method presented here, maraming salamat.

In the DR100W concept, there are several hardware to control, the LED, 20x4 LCD, Buzzer, tact switch, DR100W_EQ via TTL and I2C,  DR100W_PA  Standby and Mute, Infrared Receiver,  Bluetooth, etc….  all of these hardware is interfaced to the MCU,  the  most basic hardware to control is the LED, so let’s start with the LED.

Schematic Diagram:
1)  LED
Here is the schematic  how the LED is connected to the Atmel AT89S52 MCU – this connection is called current sink.  The LED is connected at Port 3 bit 6 (P3.6)


Target Board:
I would like to use the Smart-H Module,  this module is used with AT89Sxx MCU (8051 core from Atmel), I used it to programmed the MCU on original board designed with AT89Cxx – without ISP programming, with the Smart-H board, I can programmed the MCU on the board without taking out and plugging in the MCU back to the board.



What to do here?
Simply  “lit” the LED,  that LED connected at Port 3 bit 6 (P3.6)

A)  Program Code -  using BASIC   (BASCOM 8051 Compiler):
And here it is,

         P3.6 =0     'let  P3.6 to logic zero, so that the LED will lit

As simple as that.

Note:
In some 8051 derivative from other chipset factory, the code work best
P3.6 =0     'let  P3.6 to logic zero, so that the LED will lit
Do      ‘ endless loop – the program just keep running   
Loop
End           ‘end of program


Philippine Electronics Forum

Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #82 on: November 16, 2011, 08:11:10 AM »

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #83 on: November 16, 2011, 08:26:18 AM »
The equivalent code in  C,   with keil uVision 2,

B)  Code in C  --- with keil uVision 2

#include <REG51.H>            // include generic 8051 library

sbit led = P3^6;       // declare a variable type sbit for P3.6 << rename port 3.6 as LED>>

void main()      //the main function
{  
    while(1)      //super loop, keep the program running
    led = 0;       //Lit the LED,  by putting LED port to logic 0  [P3.6 = 0 ]
}

Philippine Electronics Forum

Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #83 on: November 16, 2011, 08:26:18 AM »

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #84 on: November 16, 2011, 08:35:22 AM »
I supposed that, intel 8051 core with Atmel derivative is not your type,  you like AVR core MCU  (from atmel),  and you have ATmega8A.    

LED is connected to PortD bit 6, in current sink configuration,  the program will be :

C)  BASCOM AVR

$regfile = "m8def.dat"                        'specify that the chipset is generic ATmge8

Config Portd.6    = Output       'Configure Port D bit 6 as output  to drived the LED
Set  PORTD..6                        'Let PortD.6 Output Logic 1, the initial logic state after power On

PORTD.6 = 0                          'Let port D bit 6 output a  logic zero, so that the LED will lit

Do                                                'keep the program Running
Loop

End                                              'end of program

Here is the Target/Trainer Board

Philippine Electronics Forum

Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #84 on: November 16, 2011, 08:35:22 AM »

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #85 on: November 16, 2011, 08:49:52 AM »
Supposed, there is an Arduino Uno Board you got  on hand for free because you join the raffle promo and you are one of the lucky winner for Arduino Uno :   http://www.electronicslab.ph/forum/index.php?topic=29832.msg552703;topicseen#msg552703,  what is the code looks like, supposed for test, you connected the LED at Arduino board label I/O 13?  

D)  Arduino Code


Offline marcelino

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 6016
  • Pogi/Ganda Points: 258
  • ...keep moving forward! - Robinson's
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #86 on: November 16, 2011, 10:15:35 AM »
Supposed, there is an Arduino Uno Board you got  on hand for free because you join the raffle promo and you are one of the lucky winner for Arduino Uno :   http://www.electronicslab.ph/forum/index.php?topic=29832.msg552703;topicseen#msg552703,  what is the code looks like, supposed for test, you connected the LED at Arduino board label I/O 13?  

D)  Arduino Code



ganito ba sis ang hinahanap mo?

Code: [Select]
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */

void setup() {               
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);   
}

void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}
from: http://www.arduino.cc/en/Tutorial/Blink
"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #87 on: November 16, 2011, 11:44:30 AM »
ganito ba sis ang hinahanap mo?

Code: [Select]
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);    
}

void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}
from: http://www.arduino.cc/en/Tutorial/Blink

Exactly sis.   The code above shows  a better control of  the LED,

here, maybe a good finding.

In the code above, the LED is connected at I/O 13  in current sourcing connection, thus, a logic 1 lit the LED and logic 0 turn off the LED.   Here is the  testing setup with arduino uno.



With the current sink connection of the LED,  I found out that,  even there is no program,  the LED still lit.    It looks like that, the I/O 13  will be forced to go logic 0 when current enters this port.   This is the same effect as with the code  :
void setup()
{
  pinMode(13, OUTPUT);             //Define pin 13 as Output to drive the LED
}

void loop()
{
  digitalWrite (13, LOW);              //let Pin 13 goes logic low to lit the LED
}

Here is the connection in the current sink mode


To realized that you control the LED,  you have to blink it - with the code you have provided above, it blinks the LED  , 1 sec ON, 1 sec OFF.   In your sample above, it can really shows that, the LED is being controlled.  Cool!


Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #88 on: November 16, 2011, 12:11:21 PM »
Let’s try the PIC MCU, PIC16F877A,  connect the LED at PORTB.0  in current sink mode

E)  Mikro C code

#define LED PORTB.0
#define LED ON 0

Void main()
{
   TRISB =0;   //configure port B  as output
   For (;; )          //endless loop
   {
               LED ON;           //PORTB.0 goes  logic 0 to lit the LED
              }
}

Note:
The above code is untested <modified --  copy from  Advance PIC Microcontroller, page 189>


Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #89 on: November 16, 2011, 12:23:31 PM »
We seen above -- from the simple program and task to controll the LED, that, with different MCUs, 8051, avr, pic, etc...., it can do the job  - - - - -  to control the LED,  ( and of coure, not only the LED , it can  control also the  different hardware like LCD, buzzer, Bluetooth, I2C device, etc...)

Let's have a better control of LED,  we know how to turn it on,  so how to turn it off?     In our DR100W conCEPT, the MMI is that,  when the LED is turn Off -- the system is on the standby mode.   When the LED is turned ON , the system is in the active mode.

Let's control the LED  Turn On and Turned OFF -- this is the next task now.

I seen a good thread on how to do this, with many example ....<<Share Your Blinker Code>>>   http://www.electronicslab.ph/forum/index.php?topic=26242.0
<<Share Your Bliner Code>>>


In this thread,   one of our friend posted a BASIC Code  as below,  which I will adapt it to fit our hardware above,  in his program as below :
'This is for AT89S51  with BASCOM 8051

do
  P1.0 = 0           'turn off led
  waitms 200       'wait 200 msec
  P1.0 = 1           'turn on led
  waitms 200            'wait 200 msec
loop                  'keep repeating

end

'===========================================================
the code above blink the LED connected at P1.0, the LED is connected in current sink with series 470 ohms resistor at pin 1 of AT89s51


I simply modify the P1.0  into P3.6, and modify the Logic output level to  fit the hardware, using BASCOM 8051.

do
      P3.6 = 1              'turn off led
      waitms 200       'wait 200 msec
      P3.6 = 0              'turn on led
      waitms 200         'wait 200 msec
loop                         'keep repeating
end




Offline maldihtah13

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4669
  • Pogi/Ganda Points: 120
  • Gender: Female
  • Everyday is a learning process so try to learn ;D
    • Blogspot
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #90 on: November 17, 2011, 05:56:51 AM »
Lalo tuloy ako na-excite sa hardware. I'll have my MCU ready (16F877 and/or Gizduino).

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #91 on: November 17, 2011, 07:55:07 AM »
Here is a complete Code in BASCOM 8051 {Basic Language} that will blink the LED connected at P3.6 at 200 msec

 
Code: [Select]
'******************************************************************************
'                 DR100W  conCEPT - - -   Power Amplifier
'                 Heart Systems Elecronic Center [ HSEC ], Baguio City
'
'                 1diyTEAM Project
'
'******************************************************************************
'
'DESCRIPTION :
'this program will blink the LED connected at port 3 bit 6 (P3.6)
'
'
'Hardware Note:  ----------------------------------------------HARDWARE NOTE
'  MCU      :  AT89S52 40 pins DIP (ATMEL)
'  Crystal  :  12 MHz
'
'
'  Power On_LED:
'        Power_On_LED > P3.6    <Port 3 bit 6>
'
'
'Filename   :  Blink_ledp3.6.bas
'           :  Rev. 1.0
'           :  october 11, 2011
'
'Designer   :
'           :  Heart Systems -  1diyTEAM
'              [http://www.1diycentre.com ]
'
'Compiler   :
'           :  BASCOM 8051 IDE 2.0.15.0 <Full Version>
'              http://www.mcselec.com
'              Thanks to Mark Alberts for the permission to use BASCOM 8051
'              Demo version to share and distribute to our diy Learners
'
'Level      :  Shareware <Seminar / uC Workshop 201>  :
'              Simple Micro Controller Programming - Part - 3
'              DR100W conCEPT
'
'------------------------------------------------------- COMPILER Directives
$regfile = "8052.dat"
'Ang Compiler directive na ito ay para utusan ang Compiler na gamitin ang
'Standard 8052 Core

'--------------------------------------------------------- NAMING VARIABLES
'
'Ang mga sumusunod na declarations ay para mas madaling tandaan ang pangalan
'ng mga Ports ayon sa function sa program

'LED
   Power_LED   Alias P3.6

'----------------------------------------------------------------INITAILIZATION
'Ang susunod na declaration ay para sa initialization ng values ng mga
'Variables

Const Delayed      = 200      '200 mesec delay


'******************************************************************************
'                              MAIN PROGRAM START
'******************************************************************************

Do
   Power_LED =0     'put P3.6 to logic zero
   Waitms Delayed   'Have a delay so the LED can see as Lighted
   Power_LED =1     'put P3.6 to logic one
   Waitms Delayed   'Have a delay so the LED can see as Turned Off
Loop


'******************************************************************************
'                               END of PROGRAM
'******************************************************************************

End


Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #92 on: November 17, 2011, 08:01:36 AM »
Thanks to Romel for sharing the code in C using Keil


Code: [Select]
/*******************************************************************************
                 DR100W conCEPT                                                                 |
                 Heart Systems Electronic Center [ HSEC ], Baguio City        |
                                                                                                                  |
                 DR100W 1diyTEAM                                                                 |

*******************************************************************************
DESCRIPTION : Lear How To Blink the LED connected at P3.6 of  AT89S51/52

*'******************************************************************************
Romel L. Emperado                                                                                  
1diyTEAM - Mindanao                                                                              
Nov. 15, 2011                          
                                                                  


'******************************************************************************
'  HARDWARE NOTE                                                                                  
'  MCU      :  AT89S52/51 40 pins DIL                                                        
'  Crystal  :  12 MHz                                                                                      
'******************************************************************************

Software IDE :  KEIL V4
LINK: http://www.keil.com/

PROGRAM NAME: LightALedProgram.c

TARGET BOARD  : NE2ss
Link: http://www.1diycentre.com/product_profile_security.htm
LEVEL            :  Shareware and Courseware

******************************************************************************
                               START of PROGRAM
******************************************************************************/

#include <REG51.H> // include 8051 register file


/* Function Prototypes */

void delayus(unsigned char delay);
void delayms(unsigned char delay);



sbit blinkingled = P3^6; // decleare a variable type sbit for P3.6

void main() //the main function
{
    blinkingled = 0; //Clear port and initialized as output
    
    while(1) //super loop
    {
        blinkingled = ~blinkingled; //Blink the LED
        delayms(1000); //Produce approx 1s delay
    }

}



/* Simple Software Delay

Function to Produce delay

*/
void delayus(unsigned char delay){
    while(delay--);
}

void delayms(unsigned char delay){
    while(delay--)
        delayus(149);
}

/* End of Simple Software Delay */

/******************************************************************************
                               END of PROGRAM
******************************************************************************/

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #93 on: November 17, 2011, 09:06:25 AM »
2.  Adding the Tact Switch  and Buzzer    <now we need to control the Buzzer and the Tact Switch>

So much for the LED,  let's control the Tact switch (keyboard)  and  Buzzer (Sound) -- which enriched the MMI between the "User" and our DR100W conCEPT.

The use of these Hardware:
a) Tact Swith = will be used by the User to communicate to the DR100W -- particularly the Control Module
b) Buzzer    = it will enrich sound communication  to the User, example, a "BEEP" confirmation if a key is pressed



From here,  I will be using BASCOM 8051 (Basic Language)  of http://www.mcselec.com - THE Nederlands ,  everyone is welcome to share their code with C, Pascal and Ladder or any other compiler.   That would be nice if someone will share  running uCOS   <while the MMI program is just starting>



Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #94 on: November 17, 2011, 11:19:10 AM »
2.1  Program to Control the Tact Switch and LED ON  -  the buzzer program is not included.
'This program will let the User to pressed the Power ON/OFF Key and it will  Light ON / Turn OFF the LED)
'
'  LED ON  = Standby Mode
'  LEd OFF = Active Mode


Code: [Select]
'******************************************************************************
'                 DR100W  conCEPT - - -   Power Amplifier
'                 Heart Systems Elecronic Center [ HSEC ], Baguio City
'
'                 1diyTEAM Project
'
'******************************************************************************
'
'DESCRIPTION :
'This program will let the User to pressed the Power ON/OFF Key and it will
'Light / Turn OFF the LED)
'
'  LED ON  = Standby Mode
'  LEd OFF = Active Mode
'
'
'Hardware Note:  ----------------------------------------------HARDWARE NOTE
'  MCU      :  AT89S52 40 pins DIP (ATMEL)
'  Crystal  :  12 MHz
'
'
'  Power On_LED:
'        Power_On_LED > P3.6    <Port 3 bit 6>
'
'
'  Power_On_Off_Switch:
'        Power_On_Off_Switch    > P3.3    <Port 3 bit 3>
'
'
'Filename   :  Tact_Switch.bas
'           :  Rev. 1.0
'           :  october 11, 2011
'
'Designer   :
'           :  Heart Systems -  1diyTEAM
'              [http://www.1diycentre.com ]
'
'
' TARGET Board :
'
'           :  Smart-H  ISP Board
'              Simply for testing
'
'Compiler   :
'           :  BASCOM 8051 IDE 2.0.15.0 <Full Version>
'              http://www.mcselec.com
'              Thanks to Mark Alberts for the permission to use BASCOM 8051
'              Demo version to share and distribute to our diy Learners
'
'Level      :  Shareware <Seminar / uC Workshop 201>  :
'              Simple Micro Controller Programming - Part - 3
'              DR100W conCEPT
'
'------------------------------------------------------- COMPILER Directives
$regfile = "8052.dat"
'Ang Compiler directive na ito ay para utusan ang Compiler na gamitin ang
'Standard 8052 Core

'--------------------------------------------------------- CONFIGURATIONS
'
'Ang mga sumusunod na declarations ay para mas madaling tandaan ang pangalan
'ng mga Ports ayon sa function sa program

'--------------------------------------------------------- NAMING VARIABLES
'
'Ang mga sumusunod na declarations ay para mas madaling tandaan ang pangalan
'ng mga Ports ayon sa function sa program


'LED
   Power_led            Alias P3.6

'Tact Switch
   Power_on_off_Switch  Alias P3.3


'******************************************************************************
'                              MAIN PROGRAM START
'******************************************************************************


   'I will Turn ON the Power On/OFF LED  upon Power ON, this will indicate
   'that the system by default is on the Standby Mode

   Reset Power_LED      '<<<I used Reset Power_LED   instead of Power_LED = 0>>
                        '<<which is the same effect>>>


'The following code, checking ang tact switch kung may pumindot,  kung may
'pumindot sa Tact switch, tatakbo ito sa label na Power_ON_LED_Status

      Do
         Debounce Power_on_off_Switch, 0, Power_ON_LED_Status, Sub
      Loop


'The code will check the status of the Power_LED,  if it is lit, it turned off
'If it is turned off, it will lit,
   Power_ON_LED_Status:

      If  Power_LED = 0  then
         Power_LED =1         'Turn OFF the LED, system is Active Mode
      Else
         Power_LED = 0        'Turn ON the LED, system is Standby Mode
      End If

   Return



'******************************************************************************
'                               END of PROGRAM
'******************************************************************************

End

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #95 on: November 17, 2011, 11:27:00 AM »
2.2  Program to control the LED,  Tact Switch and Buzzer :
'DESCRIPTION :
'this program will let the User to pressed the Power ON/OFF Key and it will Light ON  / Turn OFF the LED.  Everytime the User pressed the  Power ON/OFF Key, the buzzer will emit "Beep"

LED STatus:

'  LED ON  = Standby Mode
'  LEd OFF = Active Mode

Code: [Select]
'******************************************************************************
'                 DR100W  conCEPT - - -   Power Amplifier
'                 Heart Systems Elecronic Center [ HSEC ], Baguio City
'
'                 1diyTEAM Project
'
'******************************************************************************
'
'DESCRIPTION :
'this program will let the User to pressed the Power ON/OFF Key and it will
'Light / Turn OFF the LED.  Everytime the User pressed the  Power ON/OFF Key,
'The buzzer will emit "Beep"

'  LED ON  = Standby Mode
'  LEd OFF = Active Mode
'
'
'Hardware Note:  ----------------------------------------------HARDWARE NOTE
'  MCU      :  AT89S52 40 pins DIP (ATMEL)
'  Crystal  :  12 MHz
'
'
'  Power On_LED:
'        Power_On_LED > P3.6    <Port 3 bit 6>
'
'
'  Power_On_Off_Switch:
'        Power_On_Off_Switch    > P3.3    <Port 3 bit 3>
'
'
' Buzzer:
'        Buzzer > P2.2    <Port 2 bit 2>
'
'
'Filename   :  Tact_Switch_Put_LED_Status_Subroutine.bas
'           :  Rev. 1.0
'           :  october 11, 2011
'
'Designer   :
'           :  Heart Systems -  1diyTEAM
'              [http://www.1diycentre.com ]
'
'
' TARGET Board :
'           :  NE2ss - SHSP
'           :  http://www.1diycentre.com/product_profile_security.htm
'
'Compiler   :
'           :  BASCOM 8051 IDE 2.0.15.0 <Full Version>
'              http://www.mcselec.com
'              Thanks to Mark Alberts for the permission to use BASCOM 8051
'              Demo version to share and distribute to our diy Learners
'
'Level      :  Shareware <Seminar / uC Workshop 201>  :
'              Simple Micro Controller Programming - Part - 3
'              DR100W conCEPT
'
'------------------------------------------------------- COMPILER Directives
$regfile = "8052.dat"
'Ang Compiler directive na ito ay para utusan ang Compiler na gamitin ang
'Standard 8052 Core

'--------------------------------------------------------- CONFIGURATIONS
'
'Ang mga sumusunod na declarations ay para mas madaling tandaan ang pangalan
'ng mga Ports ayon sa function sa program

'--------------------------------------------------------- NAMING VARIABLES
'
'Ang mga sumusunod na declarations ay para mas madaling tandaan ang pangalan
'ng mga Ports ayon sa function sa program


'LED
   Power_led            Alias P3.6

'Tact Switch
   Power_on_off_Switch  Alias P3.3

'Buzzer
   Buzzer               Alias P2.2


'This jump instruction to the MAIN PROGRAM will "skip" the Subroutine to execute
'You do not actually need the Subroutine now,  it is the MAIN Program
'that will call the Subroutine
Goto START_PROGRAM


'******************************************************************************
'                             SUBROUTINE / FUNCTIONS
'******************************************************************************

Declare Sub Keypressed_Tone   '---------------------------------Keypressed_Tone
Sub Keypressed_Tone
   Sound Buzzer , 200 , 100         'duration = 200,  Frequency = 100
   Set Buzzer                       'this instruction is inserted to make
                                    'it sure that buzzer port will end in
                                    'logic 1 so as not to consume power
                                    'when P2.2 port end in logic 0, as due
                                    'to the connection of current Sink
End Sub


Power_ON_LED_Status:  '------------------------------------- Power On/OFF  LED

'The code will check the status of the Power_LED,  if it is lit, it turned off
'If it is turned off, it will lit,
'
'The Keypressed_Tone  instruction will Sound the Buzzer

      Keypressed_Tone

      If  Power_LED = 0  then
         Power_LED =1         'Turn OFF the LED, system is Active Mode
      Else
         Power_LED = 0        'Turn ON the LED, system is Standby Mode
      End If

   Return



'******************************************************************************
'                              MAIN PROGRAM START
'******************************************************************************

START_PROGRAM:

   'I will Turn ON the Power On/OFF LED  upon Power ON, this will indicate
   'that the system by default is on the Standby Mode

   Reset Power_LED      '<<<I used Reset Power_LED   instead of Power_LED = 0>>
                        '<<which is the same effect>>>


'The following code, checking ang tact switch kung may pumindot,  kung may
'pumindot sa Tact switch, tatakbo ito sa label na Power_ON_LED_Status doon
'sa Subroutine

      Do
         Debounce Power_on_off_Switch, 0, Power_ON_LED_Status, Sub
      Loop



'******************************************************************************
'                               END of PROGRAM
'******************************************************************************

End

Offline Dandy

  • Moderator
  • Lead Acid Battery
  • *****
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #96 on: November 17, 2011, 12:22:13 PM »
3. Adding the LCD Module
The next thign to control is the LCD Module.   You can use trhe Industry Standard 16x2 or 20x4 LCD Module.  For DR100W conCEPT, we are aiming for 20x4 LCD,  but if you have the 16x2 LCD Module,  you can also use it.


Offline maldihtah13

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4669
  • Pogi/Ganda Points: 120
  • Gender: Female
  • Everyday is a learning process so try to learn ;D
    • Blogspot
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #97 on: November 23, 2011, 08:59:36 PM »
Hu hu hu kailan ko kaya masisimulan ito. Sir isama nyo na sa package ko. he he he

Offline 1diyMARKET

  • Lead Acid Battery
  • *******
  • Posts: 545
  • Pogi/Ganda Points: 4
    • 1 am 1diyTEAM
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #98 on: November 24, 2011, 02:03:22 PM »
Hu hu hu kailan ko kaya masisimulan ito. Sir isama nyo na sa package ko. he he he

i-proto muna lang sis sa univ.pcb, hehehehe,  magastos daw kasi mayroon bagong tsik.
Your Support and Purchase of 1diycentre e’store products is a support to our fellow  hobbyist.  Most of the buyers here at e’store are students who do not have yet source of income.  1diyteam offer monthly payment to some items to help our fellow hobbyist.

Offline maldihtah13

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4669
  • Pogi/Ganda Points: 120
  • Gender: Female
  • Everyday is a learning process so try to learn ;D
    • Blogspot
Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #99 on: November 24, 2011, 05:58:10 PM »
i-proto muna lang sis sa univ.pcb, hehehehe,  magastos daw kasi mayroon bagong tsik.

I already have the controller ready. Yung equalizer na lang, amplifier at speaker protection ang hinihintay ko. Sana mapost ko picture mamya.

Philippine Electronics Forum

Re: 1diy group design & Learn Product Development - 100Wrms Power Amplifier
« Reply #99 on: November 24, 2011, 05:58:10 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com