tecnition_ted
New Member
Hi having a problem with baud rate when I change frequency from setfreq m16 back to setfreq m8 or setfreq mdefault.
If I use this code
If I use this code
Code:
setfreq m16 ;set clock from 8mhz to 16
init: high C.4 ;prepare output
pause 1000 ;wait
main: serout C.4, T2400, ("Value =", #b1,CR,LF) ; send value at Baud 9600
let b1 = b1 + 1 ; add 1 to previous value
pause 1000 ;wait
goto main ; return to start of program
Then the bluetooth module works and transmits data
if I add this to the code then it messes everything up the above Baud rate is changed.
[code]
setfreq ;set clock from 8mhz to 16
init: high C.4 ;prepare output
pause 1000 ;wait
main: serout C.4, T2400, ("Value =", #b1,CR,LF) ; send value at Baud 9600
let b1 = b1 + 1 ; add 1 to previous value
pause 1000 ;wait
setfreq m8 ;return clock to 8mhz
Pause 1000 ;wait
goto main ; return to start of program