Pages: [1]   Go Down

Author Topic: Icom not communicating with Stamp  (Read 19711 times)

WA4RTE

  • Member
  • Posts: 20
Icom not communicating with Stamp
« on: March 22, 2016, 04:15:15 PM »

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 and can help with this - I am a Stamp newbie.

Thanks ...
Logged

WA4RTE

  • Member
  • Posts: 20
RE: Icom not communicating with Stamp
« Reply #1 on: March 22, 2016, 05:25:27 PM »

There's a small error in my post - I copied the code from a text file to post it, but the actual code has the hex values separated by commas - it tokenizes and loads correctly ...
Logged

WA4RTE

  • Member
  • Posts: 20
RE: Icom not communicating with Stamp
« Reply #2 on: March 23, 2016, 07:54:03 AM »

Problem solved!  I was running the Icom CI-V port through a level converter to use the Stamp's RS-232 port.  The CI-V port uses TTL levels, so I revised the program to send the data to a Stamp port, then connected that port directly to the rig's CI-V port with no level converter.  It works like a charm.  A reply to my post to the Parallax (Stamp) forum pointed me in the right direction and solved my problem ...
Logged
Pages: [1]   Go Up