repacing TV_Terminal with FullDuplexSerialPlus in CTR object problems
nhaven
Posts: 4
I'm trying to use the FullDuplexSerialPlus object instead of TV_Terminal in the CTR object, but without success. When I reduce PUB Go to the following, I am able to drive a pwm fan. (A pwm fan uses leads for 12v, pwm, gound, and rpm monitoring.) This alone works great.
PUB Go | freq
SynthFreq(0, 100_000)··········· 'determine ctr and frq for pin 0
· CTRA := ctr························· 'set CTRA
· FRQA := frq························· 'set FRQA··················
· DIRA[noparse][[/noparse]0]~~·························· 'make pin output··············
· repeat································· 'loop forever to keep cog alive
··· waitcnt(0)·························· 'waitcnt to reduce power
PRI SynthFreq(Pin, Freq) | s, d
But when·I try to substitute FullDuplexSerialPlus, nothing works. What I am missing?
OBJ
· term : "FullDuplexSerialPlus"
VAR
· long· ctr, frq
·
PUB Go | freq
·
· term.start(31, 30, 0, 57600)············· 'start·FullDuplexSerialPlus
· SynthFreq(0, 100_000)···················· 'determine ctr and frq for pin 0
· CTRA := ctr···································· 'set CTRA
· FRQA := frq···································· 'set FRQA··················
· DIRA[noparse][[/noparse]0]~~····································· 'make pin output
· term.str(string(10, 13, "CTRA = "))······ 'show CTRA value
· term.hex(ctr,8)·································
· repeat············································ 'loop forever to keep cog alive
··· waitcnt(0)····································· 'waitcnt to reduce power
PRI SynthFreq(Pin, Freq) | s, d
I am new to the propeller and must be overlooking something very simple; any help will be appreciated. Essentially, I'm trying to accomplish the same thing as the CTR object, but using FullDuplexSerialPlus instead of TV_Terminal. Thanks
PUB Go | freq
SynthFreq(0, 100_000)··········· 'determine ctr and frq for pin 0
· CTRA := ctr························· 'set CTRA
· FRQA := frq························· 'set FRQA··················
· DIRA[noparse][[/noparse]0]~~·························· 'make pin output··············
· repeat································· 'loop forever to keep cog alive
··· waitcnt(0)·························· 'waitcnt to reduce power
PRI SynthFreq(Pin, Freq) | s, d
But when·I try to substitute FullDuplexSerialPlus, nothing works. What I am missing?
OBJ
· term : "FullDuplexSerialPlus"
VAR
· long· ctr, frq
·
PUB Go | freq
·
· term.start(31, 30, 0, 57600)············· 'start·FullDuplexSerialPlus
· SynthFreq(0, 100_000)···················· 'determine ctr and frq for pin 0
· CTRA := ctr···································· 'set CTRA
· FRQA := frq···································· 'set FRQA··················
· DIRA[noparse][[/noparse]0]~~····································· 'make pin output
· term.str(string(10, 13, "CTRA = "))······ 'show CTRA value
· term.hex(ctr,8)·································
· repeat············································ 'loop forever to keep cog alive
··· waitcnt(0)····································· 'waitcnt to reduce power
PRI SynthFreq(Pin, Freq) | s, d
I am new to the propeller and must be overlooking something very simple; any help will be appreciated. Essentially, I'm trying to accomplish the same thing as the CTR object, but using FullDuplexSerialPlus instead of TV_Terminal. Thanks
Comments
I have tried your code, it works very well for me. I have it successfully tested with the PC_Text driver from PropTerminal as replacement for the FullDuplexSerialPlus and also with Extended_FDSerial and FullDuplexSerial driver. The output from your program using this drivers works fine.
It would be helpfully to use the PropTerminal to test the serial functionality of your program. You can it also use with the FullDuplexSerial driver if you set the baudrate to 115200.
Here is the thread of PropTerminal.
http://forums.parallax.com/showthread.php?p=649540
Thomas