hi,
I am attempting to send midi bytes from my PIC, although i think my code is right, there is no luck. I have tried different codes but still, it won't work.
my clock is 10MHz, and the code is;
list p=16f877
include "p16f877.inc"
dcount equ 20h
org 000h
goto main
del movlw D'255'
movwf dcount
dloop2 decfsz dcount
goto dloop2
main bsf STATUS,RP0 ;
movlw d'4' ; value for the BRG
movwf SPBRG ; init BRG 31250 bauds
bcf TXSTA,SYNC
bcf STATUS,RP0 ; come back to bank0
bsf TXSTA, TXEN
MOVLW 90H
MOVF TXREG
goto del
END
Any help is much appreciated
cheers.
I am attempting to send midi bytes from my PIC, although i think my code is right, there is no luck. I have tried different codes but still, it won't work.
my clock is 10MHz, and the code is;
list p=16f877
include "p16f877.inc"
dcount equ 20h
org 000h
goto main
del movlw D'255'
movwf dcount
dloop2 decfsz dcount
goto dloop2
main bsf STATUS,RP0 ;
movlw d'4' ; value for the BRG
movwf SPBRG ; init BRG 31250 bauds
bcf TXSTA,SYNC
bcf STATUS,RP0 ; come back to bank0
bsf TXSTA, TXEN
MOVLW 90H
MOVF TXREG
goto del
END
Any help is much appreciated
cheers.