Vizitator ga3ytzu Postat Iunie 4, 2008 Partajează Postat Iunie 4, 2008 am nevoie de ceva ajutor care poate k am schema asta si nu am tot c trebuie in ea si vreau sa fac un montaj pt un amplif cam asa ceva.daca poate cineva sa ma jute astept.sau macar alte scheme de genu... :prayer: Link spre comentariu
danzup Postat Iunie 4, 2008 Partajează Postat Iunie 4, 2008 viewtopic.php?f=35&t=29786 Link spre comentariu
Vizitator ga3ytzu Postat Iunie 5, 2008 Partajează Postat Iunie 5, 2008 MS.Dar nu vreau cu relee...vroiam cu tda7318...dar nu stiu valorile pieselor.De asta am cerut ajutor. :smt010 Link spre comentariu
danzup Postat Iunie 5, 2008 Partajează Postat Iunie 5, 2008 Pai in datasheet-ul lui TDA7318 gasesti valorile recomandate de producator ! http://www.datasheetcatalog.com/datashe ... 7318.shtml Link spre comentariu
Vizitator ga3ytzu Postat Iunie 6, 2008 Partajează Postat Iunie 6, 2008 poi la tda le am...dar la ATmega8515 nu le stiu...k am cateva piese p akolo... Link spre comentariu
Administratori Badman Postat Iunie 6, 2008 Administratori Partajează Postat Iunie 6, 2008 daca nu le ai cu microcontrolerele nu ai nici o sansa sa finalizezi ce ai de gand Link spre comentariu
Vizitator ga3ytzu Postat Iunie 6, 2008 Partajează Postat Iunie 6, 2008 ai dreptate...dar tot nu vreau sa renunt... Link spre comentariu
Administratori Badman Postat Iunie 6, 2008 Administratori Partajează Postat Iunie 6, 2008 Uite, iti dau eu niste surse pentru 7318 '*******************************************************************************'* uP controlled PreAMP - TDA7318 *'* Processor AT89C52 or AT89S52 (8kB ROM), memory AT24C16(A) *'* Program author: Michal Szoplik (Szopler) - [email protected] *'* Version: 3.11 *'*******************************************************************************$regfile = "8052.dat" 'Compiler file$large 'Program greater than 2kB$crystal = 12000000 'Quartz 12MHz$baud = 2400 'Speed of RS-232 (NOT used)Config Sda = P2.1 'Data line of I2CConfig Scl = P2.0 'Clock line of I2CConfig I2cdelay = 10 'Delay of I2CConfig Lcdbus = 4 'Communication with LCD through 4 bit data busConfig Lcdpin = Pin , Db4 = P3.5 , Db5 = P3.4 , Db6 = P3.3 , Db7 = P2.5 , E = P3.6 , Rs = P3.7 'Configuration of LCD pins'Config Lcdpin = Pin , Db4 = P1.4 , Db5 = P1.3 , Db6 = P1.1 , Db7 = P1.2 , E = P3.4 , Rs = P1.0Config Lcd = 16 * 2 'Type of displayDeflcdchar 1 , 32 , 4 , 4 , 4 , 31 , 14 , 4 , 32 'arrow downCursor Off 'Turn off the LCD cursorClsConfig Rc5 = P3.2 'Infra-Red receiver port'*******************************************************************************'DECLARATIONS OF SUBROUTINESDeclare Sub Volume(dori As Bit)Declare Sub Tones(address As Integer , Dori As Bit)Declare Sub In_put(dori As Bit)Declare Sub Balance_fader(address As Integer , Dori As Bit , Disp As Byte)Declare Sub Amplification(address As Integer , In As Byte , Dori As Bit , Disp As Byte)Declare Sub Write_to_tda(tda_value As Byte)Declare Sub Mem_read(mem_address As Integer , Mem_value As Byte)Declare Sub Mem_write(mem_address As Integer , Mem_value As Byte)Declare Sub Disply(disp As Byte)Dim Fun As ByteDim Tda_value As ByteDim Mem_address As Integer , Mem_value As Byte'Dim Address_rc5 As Byte , Command_rc5 As ByteDim Address As IntegerDim Total As Integer , Part As IntegerDim Zero As Byte , Sign As ByteDim Disp As ByteDim Bort As Bit , Dori As BitDim Master As Byte , Slave As ByteDim Variable_x As ByteDim In As Byte , Amp As Byte'Dim Time As WordDim Wskaznik As BitDim Once As Bit'*******************************************************************************'CONFIGURATION OF PROCESSOR PINSS01 Alias P1.0 'Switch 1S02 Alias P1.1 'Switch 2S03 Alias P1.2 'Switch 3S04 Alias P1.3 'Switch 4S05 Alias P1.4 'Switch 5S06 Alias P1.5 'Switch 6S07 Alias P1.6 'Switch 7S08 Alias P1.7 'Switch 8S09 Alias P3.0 'Switch 9S10 Alias P3.1 'Switch 10Light Alias P2.2 'LCD backlightMute Alias P0.1 'Power amplifier muteTrafo Alias P2.7 'Trafo On/Off'*******************************************************************************'OTHER SETS'Enable Interrupts 'Enable global interrupts'Reset Tcon.0'On Int0 Infra_red'Enable Int0Fun = 0 'Set first menu levelWskaznik = 0Once = 1'Config Timer0 = Timer , Gate = Internal , Mode = 1'On Timer0 Timez'Enable Timer0'*******************************************************************************'STARTSet Mute 'Mute the power amplifierReset Trafo 'Turns trafo offSet Light 'Turn on the LCD backlightCls 'Clear displayLcd " uP ctrl PreAMP "LowerlineLcd " Starting..."Gosub Set_tda 'Set TDA7318Wait 1 'We must wait a momentClsReset Light'*******************************************************************************'MAIN PROGRAMDoWhile Fun = 0Gosub Level'Gosub TrafozOnce = 1Home UpperLcd " ON / OFF "Home LowerLcd Chr(1) ; " Press: S1&S5 " ; Chr(1)WendWhile Fun = 1'Gosub TrafozGosub Level'Gosub Light_off'Gosub MutezIf Once = 1 Then Call Mem_read(0 , Mem_value) Master = Mem_value Tda_value = Master - 1 Total = Tda_value * 125 Gosub Division If Master = 1 Then Sign = 160 Else Sign = 45 End If Call Disply(1) Home Lower Call Mem_read(9 , Mem_value) Master = Mem_value Lcd "Input: " ; Master ; " "Once = 0End IfWendWhile Fun = 2'Gosub TrafozGosub Level'Gosub Light_off'Gosub MutezHome LowerLcd "Vol|Tre|Bas|In|F"While S01 = 0 'Or Command_rc5 = 19 'VOLUME + 'Command_rc5 = 0 'Gosub Light_on Dori = 1 'Decrease (0) or Increase(1) Call Volume 'Enable Int0 'Enable interrupt from Int0WendWhile S02 = 0 'Or Command_rc5 = 18 'VOLUME - 'Command_rc5 = 0 'Gosub Light_on Dori = 0 Call Volume 'Enable Int0WendWhile S03 = 0 'Or Command_rc5 = 27 'TREBLE + 'Command_rc5 = 0 'Gosub Light_on Address = 3 'Momory address Dori = 1 'Decrease(0) or Increase(1) Bort = 1 'Bass(0) or Treble(1) Call Tones 'Enable Int0WendWhile S04 = 0 'Or Command_rc5 = 26 'TREBLE - 'Command_rc5 = 0 'Gosub Light_on Address = 3 Dori = 0 Bort = 1 Call Tones 'Enable Int0WendWhile S05 = 0 'Or Command_rc5 = 35 'BASS + 'Command_rc5 = 0 'Gosub Light_on Address = 6 'Momory address Dori = 1 'Decrease(0) or Increase(1) Bort = 0 'Bass(0) or Treble(1) Call Tones 'Enable Int0WendWhile S06 = 0 'Or Command_rc5 = 34 'BASS - 'Command_rc5 = 0 'Gosub Light_on Address = 6 Dori = 0 Bort = 0 Call Tones 'Enable Int0WendWhile S07 = 0 'Or Command_rc5 = 43 'INPUT + 'Command_rc5 = 0 'Gosub Light_on Dori = 1 Call In_put 'Enable Int0WendWhile S08 = 0 'Or Command_rc5 = 42 'INPUT - 'Command_rc5 = 0 'Gosub Light_on Dori = 0 Call In_put 'Enable Int0 WendWendWhile Fun = 3'Gosub TrafozGosub Level'Gosub Light_off'Gosub MutezHome LowerLcd "LF |RF |LR |RR|F"While S01 = 0 'Or Command_rc5 = 19 'LF + 'Command_rc5 = 0 'Gosub Light_on Address = 12 'Address in memory Dori = 0 'Decrease(0) or Increase(1) Variable_x = 128 'Tda_value Disp = 5 'Display function Call Balance_fader 'Enable Int0WendWhile S02 = 0 'Or Command_rc5 = 18 'LF - 'Command_rc5 = 0 'Gosub Light_on Address = 12 Dori = 1 Variable_x = 159 Disp = 5 Call Balance_fader 'Enable Int0WendWhile S03 = 0 'Or Command_rc5 = 27 'RF + 'Command_rc5 = 0 'Gosub Light_on Address = 15 'Address in memory Dori = 0 'Decrease(0) or Increase(1) Variable_x = 160 'Tda_value Disp = 6 'Display function Call Balance_fader 'Enable Int0WendWhile S04 = 0 'Or Command_rc5 = 26 'RF - 'Command_rc5 = 0 'Gosub Light_on Address = 15 Dori = 1 Variable_x = 191 Disp = 6 Call Balance_fader 'Enable Int0WendWhile S05 = 0 'Or Command_rc5 = 35 'LR + 'Command_rc5 = 0 'Gosub Light_on Address = 18 Dori = 0 Variable_x = 192 Disp = 7 Call Balance_fader 'Enable Int0WendWhile S06 = 0 'Or Command_rc5 = 34 'LR - 'Command_rc5 = 0 'Gosub Light_on Address = 18 'Address in memory Dori = 1 'Decrease(0) or Increase(1) Variable_x = 223 'Tda_value Disp = 7 'Display function Call Balance_fader 'Enable Int0WendWhile S07 = 0 'Or Command_rc5 = 43 'RR + 'Command_rc5 = 0 'Gosub Light_on Address = 21 Dori = 0 Variable_x = 224 Disp = 8 Call Balance_fader 'Enable Int0WendWhile S08 = 0 'Or Command_rc5 = 42 'RR - 'Command_rc5 = 0 'Gosub Light_on Address = 21 'Address in memory Dori = 1 'Decrease(0) or Increase(1) Variable_x = 255 'Tda_value Disp = 8 'Display function Call Balance_fader 'Enable Int0 WendWendWhile Fun = 4'Gosub TrafozGosub Level'Gosub Light_off'Gosub MutezHome LowerLcd "I1 |I2 |I3 |I4|F"While S01 = 0 'Or Command_rc5 = 19 'INPUT 1 AMP + ' Command_rc5 = 0 'Gosub Light_on Master = 1 'First input Dori = 1 'Decrease (0) or Increase(1) Disp = 9 'Display function Call Amplification ' Enable Int0WendWhile S02 = 0 'Or Command_rc5 = 18 'INPUT 1 AMP - ' Command_rc5 = 0 'Gosub Light_on Master = 1 Dori = 0 Disp = 9 Call Amplification 'Enable Int0WendWhile S03 = 0 'Or Command_rc5 = 27 'INPUT 2 AMP + 'Command_rc5 = 0 'Gosub Light_on Master = 2 'Second input Dori = 1 'Decrease (0) or Increase(1) Disp = 10 'Display function Call Amplification 'Enable Int0WendWhile S04 = 0 'Or Command_rc5 = 26 'INPUT 2 AMP - ' Command_rc5 = 0 'Gosub Light_on Master = 2 Dori = 0 Disp = 10 Call Amplification 'Enable Int0WendWhile S05 = 0 'Or Command_rc5 = 35 'INPUT 3 AMP + ' Command_rc5 = 0 'Gosub Light_on Master = 3 'Third input Dori = 1 'Decrease (0) or Increase(1) Disp = 11 'Display function Call Amplification 'Enable Int0WendWhile S06 = 0 'Or Command_rc5 = 34 'INPUT 3 AMP - 'Command_rc5 = 0 'Gosub Light_on Master = 3 Dori = 0 Disp = 11 Call Amplification 'Enable Int0WendWhile S07 = 0 'Or Command_rc5 = 43 'INPUT 4 AMP + 'Command_rc5 = 0 'Gosub Light_on Master = 4 'Fourth input Dori = 1 'Decrease (0) or Increase(1) Disp = 12 'Display function Call Amplification 'Enable Int0WendWhile S08 = 0 'Or Command_rc5 = 42 'INPUT 4 AMP - 'Command_rc5 = 0 'Gosub Light_on Master = 4 Dori = 0 Disp = 12 Call Amplification 'Enable Int0 WendWendLoop'*******************************************************************************'*******************************************************************************'SUBROUTINES'*******************************************************************************'VOLUMESub Volume(dori As Bit) Call Mem_read(0 , Mem_value) Master = Mem_value Tda_value = Master - 1Select Case DoriCase 0: Incr Master Incr Tda_value If Master > 64 Then Master = 64 Tda_value = 63 End IfCase 1: Decr Master Decr Tda_value If Master 15 Then Master = 15End Select Gosub Wymien Call Write_to_tda(tda_value) Call Mem_write(address , Master) Waitms 100 Gosub Jednostki Call Disply(disp)End Sub'*******************************************************************************'INPUTSub In_put(dori As Bit) Call Mem_read(9 , Mem_value) Master = Mem_valueSelect Case DoriCase 0: Decr Master If Master 4 Then Master = 4End Select Gosub Sc_master Call Mem_read(address , Mem_value) Slave = Mem_value Gosub Sc_slave Tda_value = In Or Amp Call Write_to_tda(tda_value) Call Mem_write(9 , Master) Waitms 250 Total = Master Sign = 160 Call Disply(4)End Sub'*******************************************************************************'BALANCE / FADERSub Balance_fader(address As Integer , Dori As Bit , Disp As Byte) Call Mem_read(address , Mem_value) Master = Mem_valueSelect Case Address Case 12 : Variable_x = 0 Case 15 : Variable_x = 32 Case 18 : Variable_x = 64 Case 21 : Variable_x = 96End SelectSelect Case DoriCase 0 : Decr Master If Master 32 Then Master = 32End Select Tda_value = Master + 127 Tda_value = Tda_value + Variable_x Call Write_to_tda(tda_value) Call Mem_write(address , Master) Waitms 100 If Master = 1 Then Sign = 160 Else Sign = 45 End If Master = Master - 1 Total = Master * 125 Gosub Division Call Disply(disp)End Sub'*******************************************************************************'AMPLIFICATIONSub Amplification(master As Byte , Dori As Bit , Disp As Byte) Gosub Sc_master Call Mem_read(address , Mem_value) Slave = Mem_value Select Case Dori Case 0 : Decr Slave If Slave 4 Then Slave = 4 End Select Gosub Sc_slave Tda_value = In Or Amp Call Write_to_tda(tda_value) Call Mem_write(address , Slave) Waitms 100 If Slave = 1 Then Sign = 160 Else Sign = 43 End If Slave = Slave - 1 Total = Slave * 625 Gosub Division Call Disply(disp) Gosub Luiar 'LastUsedInputAmpRecoveryEnd Sub'*******************************************************************************'UNITS for bass and sopranosJednostki:Select Case Master Case 1 : Total = 14 Case 2 : Total = 12 Case 3 : Total = 10 Case 4 : Total = 8 Case 5 : Total = 6 Case 6 : Total = 4 Case 7 : Total = 2 Case 8 : Total = 0 Case 9 : Total = 2 Case 10 : Total = 4 Case 11 : Total = 6 Case 12 : Total = 8 Case 13 : Total = 10 Case 14 : Total = 12 Case 15 : Total = 14End SelectPart = 0Select Case Master Case Is = 8 : Sign = 32 Case Is 8 : Sign = 43End SelectReturn'*******************************************************************************'EXCHANGE for bass and sopranosWymien:If Bort = 0 ThenSelect Case Master Case 1 : Tda_value = 96 Case 2 : Tda_value = 97 Case 3 : Tda_value = 98 Case 4 : Tda_value = 99 Case 5 : Tda_value = 100 Case 6 : Tda_value = 101 Case 7 : Tda_value = 102 Case 8 : Tda_value = 103 Case 9 : Tda_value = 110 Case 10 : Tda_value = 109 Case 11 : Tda_value = 108 Case 12 : Tda_value = 107 Case 13 : Tda_value = 106 Case 14 : Tda_value = 105 Case 15 : Tda_value = 104End SelectDisp = 3ElseSelect Case Master Case 1 : Tda_value = 112 Case 2 : Tda_value = 113 Case 3 : Tda_value = 114 Case 4 : Tda_value = 115 Case 5 : Tda_value = 116 Case 6 : Tda_value = 117 Case 7 : Tda_value = 118 Case 8 : Tda_value = 119 Case 9 : Tda_value = 126 Case 10 : Tda_value = 125 Case 11 : Tda_value = 124 Case 12 : Tda_value = 123 Case 13 : Tda_value = 122 Case 14 : Tda_value = 121 Case 15 : Tda_value = 120End SelectDisp = 2End IfReturn'*******************************************************************************'SELECT INPUT (In) and memory address where is its amplification (Address)Sc_master:Select Case MasterCase 1 : In = &B01000000 Address = 100Case 2 : In = &B01000001 Address = 103Case 3 : In = &B01000010 Address = 106Case 4 : In = &B01000011 Address = 109End SelectReturn'*******************************************************************************'SELECT AMPLIFICATION (Amp)Sc_slave:Select Case SlaveCase 1 : Amp = &B01011000Case 2 : Amp = &B01010000Case 3 : Amp = &B01001000Case 4 : Amp = &B01000000End SelectReturn'*******************************************************************************'MUTE'Mutez:'If Command_rc5 = 11 And Address_rc5 = 7 Then' Command_rc5 = 0' Gosub Light_on' Set Mute' Waitms 100' Enable Int0'End If''If Command_rc5 = 11 And Address_rc5 = 39 Then' Command_rc5 = 0' Gosub Light_on' Reset Mute' Waitms 100' Enable Int0'End If'Return'*******************************************************************************'TRAFO'Trafoz:'If S01 = 0 And S09 = 0 And Wskaznik = 1 Then' Set Mute' Wait 1' Reset Trafo' Reset Light' Wskaznik = 0' Fun = 0'End If''If S01 = 0 And S09 = 0 And Wskaznik = 0 Then' Set Trafo' Set Light' Wait 2' Reset Mute' Wskaznik = 1' Fun = 1'End If'If Command_rc5 = 10 And Address_rc5 = 7 Then' Command_rc5 = 0' Gosub Light_on' Set Mute' Waitms 50' Set Trafo' Waitms 200' Reset Mute' Fun = 1' Enable Int0'End If'If Command_rc5 = 10 And Address_rc5 = 39 Then' Command_rc5 = 0' Gosub Light_on' Set Mute' Waitms 200' Reset Trafo' Waitms 50' Fun = 0' Enable Int0'End IfReturn'*******************************************************************************'LEVEL OF MENULevel:While S09 = 0If S01 = 0 And S09 = 0 And Wskaznik = 1 Then Set Mute Wait 1 Reset Trafo Reset Light Wskaznik = 0 Fun = 0 Elseif S01 = 0 And S09 = 0 And Wskaznik = 0 Then Set Trafo Set Light Wait 2 Reset Mute Wskaznik = 1 Fun = 1Else 'Or Command_rc5 = 51 'Command_rc5 = 0 'Gosub Light_on Incr Fun If Fun > 4 Then Fun = 4 Home Upper Lcd " " Waitms 250 Enable Int0End IfWendWhile S10 = 0 'Or Command_rc5 = 50 'Command_rc5 = 0 'Gosub Light_on Once = 1 Decr Fun If Wskaznik = 1 Then If Fun = 75 Then'Stop Timer0'Reset Light'End If'Return'*******************************************************************************'Timer'Timez:'Incr Time'If Time >= 75 Then Time = 75'ReturnEnd Link spre comentariu
danzup Postat Iunie 6, 2008 Partajează Postat Iunie 6, 2008 Pai vorbeste clar, cine te intelege pe tine ce vrei ?Uite aici : R1= 10KohmR2= 1KohmR3= 50ohm ....250ohm in functie de cat de tare sa se aprinda bklightLipseste din schema : DAR iti garantez ca nu merge daca nu pui o resistenta de 10K intre +5V si RESET pin de la atmega.Reteaua rezistiva : 8bucati 10 KohmPot1 = 10Kohm (merge perfect si 5Kohm)R6 = 10KohmC1=C2=33pSi mai ales asculta ce zice Vasile : daca nu le ai cu Avr atmel nu faci nimic !Atentie : programul este pentru alt microcontroler (AT89C52 or AT89S52) si nu pentru Atmega8515 cum e in schema ta ! Link spre comentariu
Vizitator ga3ytzu Postat Iunie 7, 2008 Partajează Postat Iunie 7, 2008 gata...akum am inteles.ms...de akum cred k ma descurc...dupa ce am studiat mai detaliat ieri scheme am inceput sa inteleg mai exact care e treaba...multumesc pt ajutor...dak nu-mi iese nu-mi pasa.macar ma incercat si dak e sa bubuie o sa las p altcineva sa o faca...poate gasesc care sa faca si asa ceva...MULTUMESC FRATILOR... Link spre comentariu
mrt Postat Iunie 8, 2008 Partajează Postat Iunie 8, 2008 Ai softul pt. controler ? Ai cu ce-l programa ? Ca nu-i suficient sa faci montajul. Link spre comentariu
Vizitator ga3ytzu Postat Iunie 8, 2008 Partajează Postat Iunie 8, 2008 nu am nici soft si nici programator,dar mai intai sa fac montaju si pormo gasesc yo cum sa il programez sau p sineva care sa o faca... Link spre comentariu
Vizitator oamariei Postat Iunie 9, 2008 Partajează Postat Iunie 9, 2008 am nevoie de ceva ajutor care poate k am schema asta si nu am tot c trebuie in ea si vreau sa fac un montaj pt un amplif cam asa ceva.daca poate cineva sa ma jute astept.sau macar alte scheme de genu... :prayer:Eu am facut ceva odata cu un at89c2051 si fara display(doar cu led-uri indicatoare pentru sursa de semnal).Daca vrei am sa "rascolesc" sa caut schema shi softul.Se mai pot face shi modificari la soft ca sa pui LCD. Link spre comentariu
Vizitator ga3ytzu Postat Iunie 9, 2008 Partajează Postat Iunie 9, 2008 nu mai este nevoie.am gasit schema completa... :partyman: multumesc mult de ajutor... Link spre comentariu
Vizitator ga3ytzu Postat August 27, 2008 Partajează Postat August 27, 2008 am resuit sa il fac dar akum am nevoie iar de ajutor....cine imi poate programa si mie controlerul? contracost bineinteles...si posta tot yo ma ocup de ea....se baga cineva? :prayer: .... Link spre comentariu
Postări Recomandate
Creează un cont sau autentifică-te pentru a adăuga comentariu
Trebuie să fi un membru pentru a putea lăsa un comentariu.
Creează un cont
Înregistrează-te pentru un nou cont în comunitatea nostră. Este simplu!
Înregistrează un nou contAutentificare
Ai deja un cont? Autentifică-te aici.
Autentifică-te acum