The porta.0 was a typo in my message - the code was exact. This works, every time, and doesn't skip a beat:
define OSC 20
DEFINE HSER_TXSTA 24H
DEFINE HSER_BAUD 31250
main:
CMCON = 7
TRISA = %00000010
TRISB = 0
loop:
hserout [144,90,90]
goto loop
;---------------------------------------
This also works some of the time, but midi analyser shows 'error' periodically, and results are spurious:
define OSC 20
DEFINE HSER_TXSTA 24H
DEFINE HSER_BAUD 31250
main:
CMCON = 7
TRISA = %00000010
TRISB = 0
loop:
if not porta.1 then
hserout [144,90,90]
endif
goto loop
;-------------------------------------
As I said, the if...then, and the test for button is most certainly doing something to the hserout command. I've tried putting a PAUSE [x] before and after and both before and after the hserout command, and it just slows things up, and still produces errors at the midi analyser... ???
G
Bookmarks