Re: Serin and Serout problem
OKkkkkkkkkkkkay,
DEFINE OSC 4, should always be all capital letters. In fact all defines should be, I understand the PB assembler is less fussy, but MPASM must be.
Get used to using MPASM as your choice of assembler as PBP3 requires it, as does almost all of Darrel's tricks.
The define does not actually set the oscillator speed, what it does do is adjust PBP timings so when you specify something like Pause 100 it actually generates the correct number of assembly nops to give you that 100 ms. Since I am not looking at the data sheet for the 12F675 understand I am winging it here, but as I remember the option Reg does set the OSC speed. As for can you use intrc or xt or HS with serout the answer is yes but with this caveat, the slower the OSC vs The BAUD rate the more likely the error will exceed the " I just can't understand what you're saying" level of the other chip. Obviously a crystal is closer to being on frequency followed by a resonator, and then internal / external R/C oscillator. Debug seems to work better than serin / out in R/C due to lower overhead going on in the background.
Finally, if you are using a resonator of any frequency you should use the HS_OSC in your config. What this does is allow more power to run the OSC than the XT_OSC allows.
HTH
JS
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks