| ??? 05/03/00 21:38 Read: times |
#2453 - MIDI and the 8052 |
I'm trying to transmit MIDI info through the serial port on the 8052.
I'm using the following code. Does this look right? MIDI is set at 31.25Khz. This is the test program org 4000h ljmp init_serial begin: mov c, P1.1 ;copies contents into c mov P1.0, c ;copies c into P1.0 jnb P1.0,write_MIDI ljmp begin init_serial: ;sets serial transmission ;up for 31.25 KHz with ;12MHz xtal mov SCON, #40h mov TMOD, #20h ;uses timer1 mov TH1, #0FFh ljmp begin write_MIDI: ;writes a value ;of: Continuous Control ;Change, Channel 1 clr TI ;Start timer1 mov SBUF, #0B0h ;Continuous Control ;Change channel 1 setb TR1 call txloop mov SBUF, #01h ;Modulation call txloop mov SBUF, #123 ;Value call txloop ljmp begin txloop: ;has transmission ended? jnb TI, txloop ret END |
| Topic | Author | Date |
| MIDI and the 8052 | 01/01/70 00:00 | |
| RE: MIDI and the 8052 | 01/01/70 00:00 | |
| RE: MIDI and the 8052 | 01/01/70 00:00 | |
| RE: MIDI and the 8052 | 01/01/70 00:00 | |
| RE: MIDI and the 8052 | 01/01/70 00:00 | |
RE: MIDI and the 8052 | 01/01/70 00:00 |



