Controlling volume on the Vmusic2 module

djmikeys

New Member
I have got the picaxe 28x1 working with the Vmusic2 module but am having difficulties changing the volume. In the sample code given on this forum it suggests you use:

hserout 0,("vwr",$0B,vol_right,vol_left,CR)
where $00 = maximum volume,$FE is the minimum

I have tried this but it comes up with a sytax error due to the 'vol_right,vol_left' part of the code. If I take this out then the code downloads fine but the volume does not change.

Has anyone managed to control the volume before?
 

hippy

Ex-Staff (retired)
Have you declared 'vol_right' and 'vol_Left' as variables using SYMBOL ?

Symbol vol_left = b0
Symbol vol_right = b1
hserout 0,("vwr",$0B,vol_right,vol_left,CR)

That compiles okay for me. I don't have any VMUSIC2 datasheets to hand so cannot comment on the correctness of the actual "vwr" command.
 

djmikeys

New Member
Hi, thanks for your suggestions, but I am still having problems controlling the volume. I have updated the firmware and am using the function
hserout 0,("vwr",$0B,$00,$FE,CR)
This will hopefully play loud in one ear phone and quiet on the other. Where should this code be written, in the main code or the setup?
Has anyone got any other suggestions?

Cheers,
Mike
 

MPep

Senior Member
It would probably be of more help if you posted your code. Then we could see where you may be going wrong.
 
Top