| ??? 05/04/00 09:54 Read: times |
#2471 - RE: MIDI and the 8052 |
Hi Will !
There are some bugs in your code: 1. Clear TI flag before sending each byte 2. Start Timer1 once in the initialisation not in the loop The initialisation is ok. *** init_serial: MOV SCON,#40h ; 8bit UART MOV TMOD,#20h ; Timer1 8bit auto reload MOV TH1,#0FFh ; reload value for 31,25 kHz SETB TR1 ; start Timer1 *** A routine which sends the byte in the accu: *** send_MIDI_byte: JNB TI,$ ; wait until transmitter ready CLR TI ; clear flag MOV SBUF,#A ; send byte ret *** "txloop" is obsolete. You should connect any keyboard/synthi/expander an use a simple key on / key off command for testing. You can hear if it's working. |
| 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 |



