Icom radio not communicating with Stamp
joegore
Posts: 6
in BASIC Stamp
I have hit a snag with a simple BASIC Stamp program - can anyone help?
Icom Amateur Radio transceivers can be controlled externally - they use a data format like this (all hexadecimal commands):
$FE $FE $80 $E0 $00 $00 $57 $08 $07 $00 $FD - this is the command to set the radio frequency to 7085.7 kHz.
Here's a breakdown of the commands:
$FE $FE is a fixed code preamble
$80 is the data address of the radio
$E0 is the data address of the controller
$00 is the command to set frequency
$00 $57 $08 $07 $00 is a string of BCD commands to set the frequency - in this case, (reading from right to left) 00 - 07 - 08 -57 - 00 which ends up as 7085.7 kHz.
$FD is a fixed end of message code
Here's my problem:
I am using SEROUT with my BASIC Stamp BS2sx to send this code, but the radio is not responding. I have other programs that are running on my computer - they work fine and do just what they are supposed to. These programs are running 9600 8N1. I have tried different baudmodes with the Stamp, both Inverted and True, but I still get no response.
I am using the dedicated serial port (16) to communicate with the radio. I tested the radio to serial port interface, and it's working properly.
Here's my code:
'==========================================
' Send data to Icom using SEROUT
' {$STAMP BS2sx}
' {$PBASIC 2.5}
'Test to see which of these is needed:
'BaudModeTrue9600 CON 240 '9600, 8N1, True
'BaudModeInverted9600 CON 16624 '9600, 8N1, Inverted
'BaudModeTrue1200 CON 2063 '1200, 8N1, True
BaudModeInverted1200 CON 18447 '1200, 8N1, Inverted
SEROUT 16, BaudModeInverted1200, [$FE $FE $80 $E0 $00 $00 $57 $08 $07 $00 $FD]
'Sends 7085.7 to radio to set Frequency
'==========================================
I'm hoping someone has some experience with this - I am a Stamp newbie.
Thanks ...
Icom Amateur Radio transceivers can be controlled externally - they use a data format like this (all hexadecimal commands):
$FE $FE $80 $E0 $00 $00 $57 $08 $07 $00 $FD - this is the command to set the radio frequency to 7085.7 kHz.
Here's a breakdown of the commands:
$FE $FE is a fixed code preamble
$80 is the data address of the radio
$E0 is the data address of the controller
$00 is the command to set frequency
$00 $57 $08 $07 $00 is a string of BCD commands to set the frequency - in this case, (reading from right to left) 00 - 07 - 08 -57 - 00 which ends up as 7085.7 kHz.
$FD is a fixed end of message code
Here's my problem:
I am using SEROUT with my BASIC Stamp BS2sx to send this code, but the radio is not responding. I have other programs that are running on my computer - they work fine and do just what they are supposed to. These programs are running 9600 8N1. I have tried different baudmodes with the Stamp, both Inverted and True, but I still get no response.
I am using the dedicated serial port (16) to communicate with the radio. I tested the radio to serial port interface, and it's working properly.
Here's my code:
'==========================================
' Send data to Icom using SEROUT
' {$STAMP BS2sx}
' {$PBASIC 2.5}
'Test to see which of these is needed:
'BaudModeTrue9600 CON 240 '9600, 8N1, True
'BaudModeInverted9600 CON 16624 '9600, 8N1, Inverted
'BaudModeTrue1200 CON 2063 '1200, 8N1, True
BaudModeInverted1200 CON 18447 '1200, 8N1, Inverted
SEROUT 16, BaudModeInverted1200, [$FE $FE $80 $E0 $00 $00 $57 $08 $07 $00 $FD]
'Sends 7085.7 to radio to set Frequency
'==========================================
I'm hoping someone has some experience with this - I am a Stamp newbie.
Thanks ...
Comments
Bean