We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i am a noob and learning 8051 coding. i want to know how can i use PWM to write a speaker which can emit diff sound (do,re,mi,etc.) by using 2 pins only. thanks.
HI.
sorry but got last a bit wrong :(
sound(int Cycles, char delay); sound: mov dph,r6 mov dpl,r7 loop: cpl p1.0 mov a,r5 mov r2,a djnz R2,$ inc dptr mov a,dpl mov b,dph jnz loop ret
Always yo're freind.
Zeusti.
sound(int Cycles, char delay); this isn't asm code, how to call this function? or is it useful for the prog.?
u r write. it is a prototype for the asm function. u put in c and call in c.
Zeusti
who can, even in their wildes imagination, believe that a noob will, in any minuscule way, understand uncommented scribbles?
Erik