Propeller cog lockup with BS2_Functions?
AKruzel
Posts: 25
Im having trouble sending wireless data, one ascii character at a time, from my propeller to the basic stamp using the 433MHz transceiver modules.
My propeller is using the BS2_Function file to send data with code shown below:
PUB Main
' start the serial terminal
BS2.start(31,30)
'serial.start(1,0,0,9600)
init1 := "!"
init2 := "a"
BS2.HIGH(1)
repeat
letter := BS2.DEBUGIN_CHAR
BS2.SEROUT_STR(tx,letter,baud,mode,bits)
I modified the SEROUT_STR command as shown below:
PUB SEROUT_STR(Pin, letter, Baud, Mode, bits)
{{
Sends a string for serout
BS2.Serout_Str(5,string("Spin-Up World!",13),9600,1,8)
BS2.Serout_Str(5,@myStr,9600,1,8)
Code adapted from "FullDuplexSerial"
}}
init1 := "!"
init2 := "a"
SEROUT_CHAR(Pin,init1,Baud,Mode,bits)
SEROUT_CHAR(Pin,init2,Baud,Mode,bits)
SEROUT_CHAR(Pin,letter,Baud,Mode,bits)
BASIC Stamp receives information with code shown below:
DO
LOW 11
DEBUG "BEFORE 1st SERIN"
SERIN 11, 16468, [WAIT("!a"),LCDCHAR]
DEBUG ASC? LCDCHAR
HIGH 11
LOOP
My goal is to type a letter in the propeller terminal window and have it appear in the basic stamp2 terminal window. This code lets the first letter I type go through OK but any other letter afterwards nothing happens. I believe this is a cog lockup because when I take out the DEBUGIN command in the propeller code and just set letter to be A for instance, the BASIC STAMP will receive the A over and over.
This is my first time posting so if there is anything i can do to make things clearer please let me know. Any help is appreciated!
My propeller is using the BS2_Function file to send data with code shown below:
PUB Main
' start the serial terminal
BS2.start(31,30)
'serial.start(1,0,0,9600)
init1 := "!"
init2 := "a"
BS2.HIGH(1)
repeat
letter := BS2.DEBUGIN_CHAR
BS2.SEROUT_STR(tx,letter,baud,mode,bits)
I modified the SEROUT_STR command as shown below:
PUB SEROUT_STR(Pin, letter, Baud, Mode, bits)
{{
Sends a string for serout
BS2.Serout_Str(5,string("Spin-Up World!",13),9600,1,8)
BS2.Serout_Str(5,@myStr,9600,1,8)
Code adapted from "FullDuplexSerial"
}}
init1 := "!"
init2 := "a"
SEROUT_CHAR(Pin,init1,Baud,Mode,bits)
SEROUT_CHAR(Pin,init2,Baud,Mode,bits)
SEROUT_CHAR(Pin,letter,Baud,Mode,bits)
BASIC Stamp receives information with code shown below:
DO
LOW 11
DEBUG "BEFORE 1st SERIN"
SERIN 11, 16468, [WAIT("!a"),LCDCHAR]
DEBUG ASC? LCDCHAR
HIGH 11
LOOP
My goal is to type a letter in the propeller terminal window and have it appear in the basic stamp2 terminal window. This code lets the first letter I type go through OK but any other letter afterwards nothing happens. I believe this is a cog lockup because when I take out the DEBUGIN command in the propeller code and just set letter to be A for instance, the BASIC STAMP will receive the A over and over.
This is my first time posting so if there is anything i can do to make things clearer please let me know. Any help is appreciated!
Comments