Re: Asynchronous baud rates on a 12F683 (serin / serout)
Ok,
I see some "minor details"
Var names must generally match B0 != b0
You used 1 for the pin name, I don't use that as it confuses me, I use GPIO.1
Defines must be caps, Define OSCCON_1K, define OSC 4 (notice I did NOT Capitalize the word define (no matter) but OSC IS CAPITALIZED.
Code:
DEFINE OSC 4
DEFINE OSCCON_1k 1 ' 4 ' 4mhz
ANSEL = %00000000 ' all pins digital
Include "modedefs.bas"
OSCCON = %01100000
B0 var byte
B1 var byte
B10 var byte
main:
SERIN GPIO.1, T9600, 10, main, [$65],B1,B0
End
You might find the debug command is faster, and more compact than any of the other "software" serial commands.
Last edited by Archangel; - 15th September 2015 at 01:41.
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