Page 1 of 1

Музыка на ATtiny 2313

Posted: 02 Jul 2009 22:07
by vpashko
Подскажите, а не приходилось ли кому нибудь в железе на BASCOM AVR воспроизводить музыку???, у меня что то не получается.

Вот код:
$regfile = "2313def.dat"
$crystal = 1000000
Config Portb.0 = Output
Speaker Alias Portb.0
'====================
Do
'Europe :: Final Countdown
Sound Speaker , 124 , 675 'H2(1/16)
Sound Speaker , 110 , 758 'A2(1/16)
Sound Speaker , 248 , 675 'H2(1/8)
Waitms 125 'P(1/16)
Sound Speaker , 165 , 1011 'E2(1/8)
Waitms 250 'P(1/8)
Waitms 125 'P(1/16)
Sound Speaker , 131 , 637 'C3(1/16)
Sound Speaker , 124 , 675 'H2(1/16)
Sound Speaker , 131 , 637 'C3(1/16)
Waitms 125 'P(1/16)
Sound Speaker , 124 , 675 'H2(1/16)
Waitms 125 'P(1/16)
Sound Speaker , 220 , 758 'A2(1/8)
Waitms 125 'P(1/16)
Waitms 250 'P(1/8)
Sound Speaker , 131 , 637 'C3(1/16)
Sound Speaker , 124 , 675 'H2(1/16)
Sound Speaker , 262 , 637 'C3(1/8)
Waitms 125 'P(1/16)
Sound Speaker , 165 , 1011 'E2(1/8)
Waitms 250 'P(1/8)
Waitms 125 'P(1/16)
Sound Speaker , 110 , 758 'A2(1/16)
Sound Speaker , 98 , 850 'G2(1/16)
Sound Speaker , 110 , 758 'A2(1/16)
Waitms 125 'P(1/16)
Sound Speaker , 98 , 850 'G2(1/16)
Waitms 125 'P(1/16)
Sound Speaker , 92 , 901 'Fis2(1/16)
Waitms 125 'P(1/16)
Sound Speaker , 110 , 758 'A2(1/16)
Waitms 125 'P(1/16)
Sound Speaker , 196 , 850 'G2(1/8)
Loop

Прошиваю программой Uniprof, фузы выставляю из программы ParaPROG :
Low_0 = CKSEL0|U
Low_1 = CKSEL1|P
Low_2 = CKSEL2|P
Low_3 = CKSEL3|P
Low_4 = SUT0|P
Low_5 = SUT1|U
Low_6 = BODEN|U
Low_7 = BODLEVEL|U
High_0 = BOOTRST|U
High_1 = BOOTSZ0|P
High_2 = BOOTSZ1|P
High_3 = EESAVE|U
High_4 = CKOPT|U
High_5 = SPIEN|P
High_6 = WDTON|U
High_7 = RSTDISBL|U

[lock-bits]
Lock_0 = LB1|U
Lock_1 = LB2|U
Lock_2 = BLB01|U
Lock_3 = BLB02|U
Lock_4 = BLB11|U
Lock_5 = BLB12|U
В динамике слышно не музыку а какую то переменку, в Протеусе работает четко, что может быть???