Articles

News

inde


Contact Information
Articles
Links

RS-232 Control of the Yaesu FRG-100

Interface Unit: FIF-232C (converts 5V TTL to RS-232 polar)

Standard Connections Used: TXD, RXD, GND

Flow Control: None (for the equipment featured here)

Type of RS-232 Command Set: Binary, 5-byte fixed length frames (1-byte opcode + 4bytes of data/parameters)

Data Parameters: 4800 bps (fixed), 1 start, 8 data + 2 stop bits

FRG100 Interface

Data must be sent to the radio in 5-byte frames with up to 200 ms between each byte. The format (sent left to right) is as follows:

1

2

3

4

5

4th Arg 3rd Arg 2nd Arg 1st Arg Opcode

Note: The byte ordering of the frame sequence may be reversed with some models (eg FRG-9600).

Five bytes must always be sent in each RS-232 command enen if there is not four bytes of data - in which case the remaining bytes must be filled with dummy values.

Common Commands

Function Opcode
(hex)
Arg1 Arg2 Arg3 Arg4 Argument description
Memory Recall 02h ch - - - Recalls memory channels 1-50, Lo & Hi,
where ch=01-32h, 33h(Lo) or 34h(Hi)
VFO->M 03h f1 f2 - - Copy displayed freq. to memory where
f1 is the memory channel (f1=01-34h)
f2 is the function as below:
f2 function
00h set
01h mem clear
02h recall
Lock 04h p - - - Tuning knob lock, p=0 (unlock), p=1 (lock)
VFO operation 05h - - - - Select VFO operation
M->VFO 06h ch - - - Copy memory channel to VFO
(ch=01-34h)
Up 07h - s - - Increment the current frequency,
s=0 (100 kHz), s=1 (1 MHz)
Down 08h - s - - Decrement the current frequency,
s=0 (100 kHz), s=1 (1 MHz)
Set Operating
Frequency
0ah f1 f2 f3 f4 New operating frequency in BCD format:
Example: To set 14.250MHz the values of
f1-f4 are:
f1 00h
f2 50h
f3 42h
f4 01h
Mode 0ch m - - - Select mode as follows:
m mode
00h LSB
01h USB
02h CW wide
03h CW narrow
04h AM wide
05h AM narrow
06h FM
07h FM
Pacing 0eh n - - - Add n milliseconds (n=0-ffh) delay between
each byte of data returned from the radio
Status Update 10h u - - - Instructs the radio to return status data,
either 1, 18, 19 or 292 bytes
(Note: description not covered here)
Power 20h p - - - Turns the radio on (p=01h) or off (p=00h)
Clock Set 21h c1 c2 c3 -
c1 function c2 c3
00h 12/24hr toggle c2=00h (24hr)
c2=01h (12hr)
 
01h Time #1 set c2=hours (BCD) c3=min (BCD)
02h Time #2 set c2=offset hours (BCD)
c3= offset min (BCD)
Timer/Sleep Time Set 22h t1 t2 t3 t4
t1 function t2-t3 t4
01h On-time set BCD time hh, mm 00h=on
01h=off
02h Off-time set BCD time hh, mm 00h=on
01h=off
03h Sleep-time set BCD time hh, mm 00h=on
01h=off
Scan Skip Set 8dh x y - - Select memory channel x (01-31h) to be skipped
y=00h (skip on), y=01h (skip off)
Step Frequency Size 8eh d - - - d=0 increment step size, d=1 decrement size
minimum step size 10Hz (non-FM) or 100Hz (FM)
Read S-meter f7h - - - - Return meter value (repeated 4 times):
arg4 arg3 arg2 arg1 op
val val val val f7h
Dim f8h d - - - LCD backlighting d=00h (On), d=01h (Off)
Read Flags fah - - - - Instructs radio to return 24 1-bit status flags
(Note: not described further here)

Although the basic principle of operation with each Yaesu model is the same, you can expect to see differences in the command byte ordering and the format of data passed to te radio or returned from it. Since the RS-232 interface is a binary one, it is difficult to debug using text based i/o on your PC (the data values have to be converted to text, in which case the debugging code could also be buggy).

Basics | Kenwood | Icom | Yaesu | AOR | At a glance

This document maintained by simon.collings@cableinet.co.uk.
Material Copyright © 2000 Simon Collings