BS2SX reading data
Hi to all:
I'm trying to write a morse code keyer program, and want to use a for loop,
and read in a data string, one character at a time...
I'd like to use for i=1 to x.....
Use the i value for an index and grab a character in a character string,
generate dots and dashes, increment until the data string is complete...
Thanks,
Art
I'm trying to write a morse code keyer program, and want to use a for loop,
and read in a data string, one character at a time...
I'd like to use for i=1 to x.....
Use the i value for an index and grab a character in a character string,
generate dots and dashes, increment until the data string is complete...
Thanks,
Art
Comments
>
>I'm trying to write a morse code keyer program, and want to use a for loop,
>and read in a data string, one character at a time...
>
>I'd like to use for i=1 to x.....
>
>Use the i value for an index and grab a character in a character string,
>generate dots and dashes, increment until the data string is complete...
>
>Thanks,
>
>Art
Hi Art,
Question 1, how to read the string data. I am not sure where your
character string is coming from, but lets say it stored as DATA in
eeprom.
char var byte
ix var byte
spoint var word
string1 data "MR MORSE, 73, ARE YOU THERE?",0
string2 data "CQ",0 ' null terminated strings
top:
spoint=string1
gosub showstring
spoint=string2
gosub showstring
end
showstring
loop:
read spoint,char
if char=0 then endofstring
debug char '<--- want to send Morse code here!
spoint=spoint+1
endofstring
return
Are you also asking Question 2, how to convert the characters to
Morse code and send it?
-- best regards
Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
mailto:tracy@e...
>Hi to all:
>
>I'm trying to write a morse code keyer program, and want to use a for loop,
>and read in a data string, one character at a time...
>
>I'd like to use for i=1 to x.....
>
>Use the i value for an index and grab a character in a character string,
>generate dots and dashes, increment until the data string is complete...
>
>Thanks,
>
>Art
Hi Art,
Question 1, how to read the string data. I am not sure where your
character string is coming from, but lets say it stored as DATA in
eeprom.
char var byte
spoint var word
string1 data "MR MORSE, 73, ARE YOU THERE? ",0
string2 data "CQ",0 ' null terminated strings
top:
spoint=string1
gosub showstring
spoint=string2
gosub showstring
end
showstring:
read spoint,char
if char=0 then endofstring
debug char '<--- want to send Morse code here!
spoint=spoint+1
goto showstring
endofstring
return
Are you also asking Question 2, how to convert the characters to
Morse code and send it?
-- best regards
Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
mailto:tracy@e...