hippy
Ex-Staff (retired)
It seems the PICAXE-18X can control the on-chip AUSART and Output Pin 5 can be used for high-speed serial output ( see other posts ) and also for MIDI Out ...
http://homepage.ntlworld.com/the.happy.hippy/picaxe/midiuart.txt
Two resistors and a DIN socket and you have a MIDI controller. The 220R are as defined in the official MIDI 1.0 Specification. Requires about 3mA in total with no other circuitry.
Also appears to work at 4MHz with 'SPBRG_INIT = 1'. Plenty of scope for the code to be optimised; I don't think the check for buffer empty in UartTx needs to be there as the byte transmission time is less than the PICAXE instruction execution time.
Note that CHANNEL is 1 to 16 ( not 0 to 15 ) to match real world conventions.
Also note that one 220R goes to +5V, and if you put it to 0V ( D'Oh ! ) or swap the wires over, you'll either get nothing or a lot of 'MIDI Buffer Full" and other error messages.
Apart from Output 5 being used for MIDI Out ( and Output 2 appears to get forced low ), the PICAXE can be used as normally, so plenty of scope for <i>something </i> to MIDI devices.
Doesn't seem to work with an 18, the 08, 08M and 18A don't have AUSART's, but should also work on 28's and 40X. No guarantees it will work with all 18X's, but I suspect it will.
http://homepage.ntlworld.com/the.happy.hippy/picaxe/midiuart.txt
Two resistors and a DIN socket and you have a MIDI controller. The 220R are as defined in the official MIDI 1.0 Specification. Requires about 3mA in total with no other circuitry.
Also appears to work at 4MHz with 'SPBRG_INIT = 1'. Plenty of scope for the code to be optimised; I don't think the check for buffer empty in UartTx needs to be there as the byte transmission time is less than the PICAXE instruction execution time.
Note that CHANNEL is 1 to 16 ( not 0 to 15 ) to match real world conventions.
Also note that one 220R goes to +5V, and if you put it to 0V ( D'Oh ! ) or swap the wires over, you'll either get nothing or a lot of 'MIDI Buffer Full" and other error messages.
Apart from Output 5 being used for MIDI Out ( and Output 2 appears to get forced low ), the PICAXE can be used as normally, so plenty of scope for <i>something </i> to MIDI devices.
Doesn't seem to work with an 18, the 08, 08M and 18A don't have AUSART's, but should also work on 28's and 40X. No guarantees it will work with all 18X's, but I suspect it will.