Quote Originally Posted by mister_e View Post
yes, tricking the way you said should work... but i don't see any advantage here.
According to the manual, when using SERIN/SEROUT, 4mhz only get you 2400 baud reliably. Tricking the compiler, a person should be able to get 4800 on 8mhz, 9600 on 16mhz, etc. without too much worry...that's all.
I'm using this sort of thing to work my comm's at 38,400 with a bit more accuracy (I think). My program, running at 40mhz, didn't seem to want to run when compiled with DEFINE OSC 40 and SEROUT2...6 to get 38,400 comm's. But, if I defined 4mhz and SEROUT2...254, and just pretended to be using 3,840bps, it worked like a champ. I dunno, maybe the timing was just off that one or two extra microseconds or something...