I have connected pin 1.0 to a 8ohm speaker through a op amp LM386.
Referring to lots of online resource.. if they want to generate a song, they would like to do so:
Song: DB 23h, 21h, 23h, 23h, 21h......
DB 23h, 21h, 23h, 23h, 21h......
DB 23h, 21h, 23h, 23h, 21h......
DB 23h, 21h, 23h, 23h, 21h......
and then acall a subroutine like that:
Sing:
......
MOV DPTR, #Song
SETB P1.0 ;TURN SPEAKER ON
MOV A, #0
MOVC A, @A+DPTR
INC DPTR
......
HERE IS MY DOUBT... that since P1.0 is only one bit can either be set it high or low, how can i send the song to this bit ??
And, after i move #Song to DPTR... and also ACC,
the song will automatically sing ??
Why do i send the notes to DPTR and ACC, but the speaker can sound out?
Referring to lots of online resource.. if they want to generate a song, they would like to do so:
Song: DB 23h, 21h, 23h, 23h, 21h......
DB 23h, 21h, 23h, 23h, 21h......
DB 23h, 21h, 23h, 23h, 21h......
DB 23h, 21h, 23h, 23h, 21h......
and then acall a subroutine like that:
Sing:
......
MOV DPTR, #Song
SETB P1.0 ;TURN SPEAKER ON
MOV A, #0
MOVC A, @A+DPTR
INC DPTR
......
HERE IS MY DOUBT... that since P1.0 is only one bit can either be set it high or low, how can i send the song to this bit ??
And, after i move #Song to DPTR... and also ACC,
the song will automatically sing ??
Why do i send the notes to DPTR and ACC, but the speaker can sound out?