Steve, any chance of letting the baud rate utility accept 1250000? That is a valid speed according to the datasheets, but the utility does not accept it.
Robert
![]()
Steve, any chance of letting the baud rate utility accept 1250000? That is a valid speed according to the datasheets, but the utility does not accept it.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
These values work in the utility:
FOSC=20
SPBRG=0
20/16(0+1) = 1.250 = 1250 KBAUD
These don't:
FOSC=48
SPBRG=0
48/16(0+1) = 3.000 = 3000 KBAUD
Don't you hate 18F MCUs?
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
nope i don't hate them... it's more a matter of updating it to fit with the EUSART.... as already asked a while back.
Do you really need it as this fast is always my question
I'll do the EUSART thing one day.
For now, i'd modified the baud restriction. try it... use it to your own risk and all the usual disclaimer stuff. Didn't test it in real environement so, if it works, it works case not... too bad![]()
Last edited by mister_e; - 21st July 2006 at 21:08.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Well, I don't know exactly how fast I need it the USART to go. All I know is that it has to be fast enough so that I can transfer 2 bytes from the 16F to the 18F without losing the USB connection.Originally Posted by mister_e
I had some difficulty in coming up with a baud rate that was compatible between a 16F @ 20MHz and a 18F @ 48MHz. Since I can't change the FOSC for the 18F because of USB, I did the next best thing and adjusted the FOSC on the 16F. I used 16 MHz which is a multiple of 48, I figured I could come up with a compatible SPBRG value that way.
Sure enough, SPBRG=0 @ 16 MHz and SPBRG=2 @ 48 MHz both give 1000 KBAUD. It's not the maximum of 1250, but it's close. Now I have to make some tests later and see if the USB connection holds up.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
use the calc and get the lower error % is one of the best trick i can say. Now uncheck the BRGH=1 box to compare both results. Sometime BRGH=1 give a better error % sometimes not. it's all depend of the OSC speed and the BRGH setting. This one of the reason i did this calc. Probably i could add an auto error % feature wich will compare both BRGH=1 and BRGH=0 results and give the best of it. As now it just provide the best error % for the BRGH you choose.
Using your example, both gave 0% error percentage.. couldn't be better assuming a real 16MHZ and a real 48MHZ
HTH
Last edited by mister_e; - 21st July 2006 at 21:56.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thanks Steve, the new "improved" version works great!
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
How dare you edit the title bar? mon esti'd'chien saleLMAO!
Great to know it's working
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks