23 lines
316 B
Plaintext
23 lines
316 B
Plaintext
con
|
|
_clkmode = xtal1 + pll16x
|
|
_clkfreq = 80_000_000
|
|
|
|
obj
|
|
ser : "FullDuplexSerial.spin"
|
|
|
|
pub main | i
|
|
ser.start(31, 30, 0, 115200)
|
|
|
|
repeat i from 0 to 10
|
|
ser.dec(fib(i))
|
|
ser.tx(32)
|
|
|
|
waitcnt(_clkfreq + cnt)
|
|
ser.stop
|
|
cogstop(0)
|
|
|
|
pub fib(i) : b | a
|
|
b := a := 1
|
|
repeat i
|
|
a := b + (b := a)
|