Si4734 Hardware and Software Guides


just_rtfm
 

Hacking the Si4734:
Hardware (Ver 2) and Software Handbooks for Shortwave

available at link below. error reports welcome.
http://home.comcast.net/~phils_radio_designs/index2.htm

regards,
phil :)


Roy <roy.dyball@...>
 

Hi Phil

Your Ver 2 is very informative.

 

You might like to point out that the AM: LO frequency is 45 kHz above RF for RF frequencies < 1000 kHz and 45 kHz below RF for RF frequencies > 1000 kHz. For example, LO frequency is 945 kHz when tuning to 900 kHz. Also in Ver 40 firmware there are two more filter selections available 1.8Khz an 2.5Khz with gradual roll off, also a power line filter is available. Also some of the power up defaults have changed e.g. the soft mute with the introduction of the Ver 40 firmware (Si4734-C40).

 

Cheers Roy.

 

 

 


--- In ultralightdx@..., "just_rtfm" wrote:
>
> Hacking the Si4734:
> Hardware (Ver 2) and Software Handbooks for Shortwave
>
> available at link below. error reports welcome.
> http://home.comcast.net/~phils_radio_designs/index2.htm
>
> regards,
> phil :)
>


just_rtfm
 

howdy Roy!

thank you. i need to add that info. my original plan was RS232 control. i recently saw your USB/G8 work... excellent job!

regards,
phil :)


Roy <roy.dyball@...>
 

Thank you for the complement Phil.

In the early days of getting my interface working I looked at using RS232 to keep the cost down. An early interface I constructed used the URAT output lines of an FTDI chip by bit banging the normal RS232 lines in an I2C two wire configuration (SDIO SCLK), the trouble was it was too slow and I could not get status information back quick enough by polling. The other problem was I had to convert my interface to the 3 wire legacy control interface from I2C because that is what Tecsun uses in our little radios and I wanted the ability to remove the radio from the computer and be able to go on using it with the changes just made (soft mute off different filter).

The 3 wire (SDIO SCLK SEN) control interface opened up a big can of worms because it uses a non standard nine bit control word. I then discovered I could use the advanced bit banging functions of the FTDI chip to construct a non standard nine bit word and get my I/O routines running fast enough to produce good results. By this time it was clear to me that RS-232 would not do the job.

Scott has a superior interface to mine in that he is using a Si Labs C8051F321 MCU this allows him to tristate the control lines making a switch not necessary to unhook the radios controller. Also by using an MCU it takes a huge load of the computer because the I/O to the Si4734 is done locally by the MCU. Another good feature is it can store command sequences that can be run without a computer say at power up or at the press of a button.

Cheers Roy.    

  

--- In ultralightdx@..., "just_rtfm" wrote:
>
>
>
> howdy Roy!
>
> thank you. i need to add that info. my original plan was RS232 control. i recently saw your USB/G8 work... excellent job!
>
> regards,
> phil :)
>


sdwillingham
 

Roy,

The 9-bit control word is a bit of a pain, but although it is not
obvious, it is not too hard to use a standard 8-bit SPI-type
interface to communicate with the Si4734. The technique is used
in this software:

http://www.silabs.com/Support%20Documents/Software/AN264SW.zip

(See the CONTROL_WRITE and CONTROL_READ macros in file
F320_Si470x_Interface.h. Note, this code is for the Si470x parts,
but works the same for Si473x if you change the chip-address to
0xA0 instead of 0x60.)

The basic idea is to do a 2-byte read or write by packaging the
25-bit command+response or command+data in four 8-bit transactions.
(While manually banging the SENB signal before and after the
32-bits.) The first 25 bits are as documented for the part. The
last 7 bits just hang on as partial extra response or data. When
SENB is driven high, the last partial transaction is aborted and
the control interface state-machine is reset for a new transaction.

Perhaps you can simplify your interface with this technique.

Cheers,
Scott

--- In ultralightdx@..., "Roy" <roy.dyball@...> wrote:
The 3 wire (SDIO SCLK SEN) control interface opened up a big can of
worms because it uses a non standard nine bit control word. I then
discovered I could use the advanced bit banging functions of the FTDI
chip to construct a non standard nine bit word and get my I/O routines
running fast enough to produce good results. By this time it was clear
to me that RS-232 would not do the job.


just_rtfm
 

Roy, thanks for your informative post! if you have time: tune your G8 to 5 MHz via the radio and then poll status via your USB interface, what is the capacitor value? how about at 10 MHz? 20 MHz?

Scott, thanks for the ZIP... lots of great info in there.

regards,
phil :)


Roy <roy.dyball@...>
 

Hi Scott

Thank you for the link to the sample C code and the explanation. All my code is written in VB.NET 2008. I have many years experience with it from my previous business dealings before I retired and the program was going before I thought too much about it. I have got the 3 wire interface running really well and the 9 bit data word was a real challenge especially in VB.NET, I think the hardest part was getting the half clock cycle delay correct during the bus turn around.

Because the Tecsun uses the 3 wire interface I feel it is best to stick with it while they use it because I can unhook my interface, and as soon as I switch the local MCU control lines back in it takes over without a fuss and you can still use any changes you have made until power down while using the radio normally.

I am really leaning toward using an MCU like you are doing and am looking forward to seeing your final results. I noticed you have posted more pictures and your radio with interface looks good now it is back together.

Cheers Roy.

--- In ultralightdx@..., "sdwillingham" wrote:
>
>
>
>
> Roy,
>
> The 9-bit control word is a bit of a pain, but although it is not
> obvious, it is not too hard to use a standard 8-bit SPI-type
> interface to communicate with the Si4734. The technique is used
> in this software:
>
> http://www.silabs.com/Support%20Documents/Software/AN264SW.zip
>
> (See the CONTROL_WRITE and CONTROL_READ macros in file
> F320_Si470x_Interface.h. Note, this code is for the Si470x parts,
> but works the same for Si473x if you change the chip-address to
> 0xA0 instead of 0x60.)
>
> The basic idea is to do a 2-byte read or write by packaging the
> 25-bit command+response or command+data in four 8-bit transactions.
> (While manually banging the SENB signal before and after the
> 32-bits.) The first 25 bits are as documented for the part. The
> last 7 bits just hang on as partial extra response or data. When
> SENB is driven high, the last partial transaction is aborted and
> the control interface state-machine is reset for a new transaction.
>
> Perhaps you can simplify your interface with this technique.
>
> Cheers,
> Scott
>
> --- In ultralightdx@..., "Roy" roy.dyball@ wrote:
> > The 3 wire (SDIO SCLK SEN) control interface opened up a big can of
> > worms because it uses a non standard nine bit control word. I then
> > discovered I could use the advanced bit banging functions of the FTDI
> > chip to construct a non standard nine bit word and get my I/O routines
> > running fast enough to produce good results. By this time it was clear
> > to me that RS-232 would not do the job.
>


Roy <roy.dyball@...>
 

Hi Phil

I would gladly do that for you but my G8 with the interface has the Si4734 removed at the moment. I will be able to do it toward the end of the week when the new chip arrives and I have installed it.

When you tune a SW frequency you change the 0 high and low byte capacitance values signifying automatic tunning at MW frequencies, to a 1 in the low byte and a 0 in the high byte capacitance value signifying SW. I can't remember what it comes back with for SW frequencies but I will let you know as soon as it is running again.

Roy.

--- In ultralightdx@..., "just_rtfm" wrote:
>
>
>
> Roy, thanks for your informative post! if you have time: tune your G8 to 5 MHz via the radio and then poll status via your USB interface, what is the capacitor value? how about at 10 MHz? 20 MHz?
>
> Scott, thanks for the ZIP... lots of great info in there.
>
> regards,
> phil :)
>


gratiscomputer <gratiscomputer@...>
 

Roy schreef:

Hi Scott

Thank you for the link to the sample C code and the explanation. All my code is written in VB.NET 2008. I have many years experience with it from my previous business dealings before I retired and the program was going before I thought too much about it. I have got the 3 wire interface running really well and the 9 bit data word was a real challenge especially in VB.NET, I think the hardest part was getting the half clock cycle delay correct during the bus turn around.
Strange, but I think I saw some source code on the german site modul-bus ag (or so), where they sell a silabs chip on a usb-bridge.

Marc


Roy <roy.dyball@...>
 

Hi Marc

Yes I came across that site. They had written their code in VB6 and were using the I2C interface to control the chip. They openly admitted it did not work properly and someone had rewritten the program using Delphi which is what they are using now.

Cheers Roy.   

--- In ultralightdx@..., gratiscomputer wrote:
>
> Roy schreef:
> >
> >
> > Hi Scott
> >
> > Thank you for the link to the sample C code and the explanation. All
> > my code is written in VB.NET 2008. I have many years experience with
> > it from my previous business dealings before I retired and the program
> > was going before I thought too much about it. I have got the 3 wire
> > interface running really well and the 9 bit data word was a real
> > challenge especially in VB.NET, I think the hardest part was getting
> > the half clock cycle delay correct during the bus turn around.
> >
>
> Strange, but I think I saw some source code on the german site modul-bus
> ag (or so), where they sell a silabs chip on a usb-bridge.
>
> Marc
>


gratiscomputer <gratiscomputer@...>
 

Roy schreef:

Hi Marc

Yes I came across that site. They had written their code in VB6 and were using the I2C interface to control the chip. They openly admitted it did not work properly and someone had
I threw away my history in firefox, which was a stupid idea... Do you have the site??

Delphi is Pascal code and is much clearer than all those VB/C++/C# samples..
http://freepascal.org will supply a pascal compiler for all platforms...


Marc


sdwillingham
 

Roy,

A clarification: the code in the reference design I linked to
is actually operating the chip in 3-wire mode. It nicely makes
use of the MCU's SPI interface hardware, but the incoming and
outgoing serial data lines are actually connected together with
a 1 kohm resistor (see the schematic in the app note).

I actually used a version of that code example in the first
version of my interface. That said, I'm back to bit-banging
with my current software.

Yesterday, one of these arrived at my house from Mouser:

http://www.silabs.com/Support%20Documents/TechnicalDocs/ToolStick_F321_DC_UG.pdf

It's quite a lot bigger than my present prototype, but should be
easier to work with in terms of solder points, etc. Last night
I determined that if I cut off the bottom third of the board
(where the potentiometer and switch are), I will be able to fit
the remainder inside my PL-380. (These Tecsuns are remarkable
in their packaging design -- very little wasted space and yet
very easy to dis- and re-assemble.) The PL-380's built-in USB
connector will make this a very stealth modification!

-Scott-

--- In ultralightdx@..., "Roy" <roy.dyball@...> wrote:

Because the Tecsun uses the 3 wire interface I feel it is best to stick
with it while they use it because I can unhook my interface, and as soon
as I switch the local MCU control lines back in it takes over without a
fuss and you can still use any changes you have made until power down
while using the radio normally.

I am really leaning toward using an MCU like you are doing and am
looking forward to seeing your final results. I noticed you have posted
more pictures and your radio with interface looks good now it is back
together.


Roy <roy.dyball@...>
 

Marc

Here is a link to the Delphi code it is at the bottom of the page

http://www.elexs.de/SI4735c.html

Roy


--- In ultralightdx@..., gratiscomputer wrote:
>
> Roy schreef:
> >
> >
> > Hi Marc
> >
> > Yes I came across that site. They had written their code in VB6 and
> > were using the I2C interface to control the chip. They openly admitted
> > it did not work properly and someone had
> >
> I threw away my history in firefox, which was a stupid idea... Do you
> have the site??
>
> Delphi is Pascal code and is much clearer than all those VB/C++/C# samples..
> http://freepascal.org will supply a pascal compiler for all platforms...
>
>
> Marc
>


gratiscomputer <gratiscomputer@...>
 

Roy schreef:

Marc

Here is a link to the Delphi code it is at the bottom of the page

http://www.elexs.de/SI4735c.html <http://www.elexs.de/SI4735c.html>

Roy

Roy,

Here is the link on how to let freepascal compile/import Delphi code:
http://wiki.freepascal.org/Delphi

Marc


Roy <roy.dyball@...>
 

Scott

Thank you for putting me straight about the SPI connection to the MCU.

Am I correct in assuming that you are only using the daughter board alone and not the base board connected to the daughter board? Is the daughter board available on its own from Mouser?

Scott what version of C are you using. Is the Si labs development environment and tools all one would need to get an interface working with the ability to slot in my own code? Are the PC-USB libraries included in the development environment?

I will probably order one of these MCU boards and have a go. There goes another life time LOL. I will look forward to your results with the new board. I also thought it made good sense to utilise the existing USB connector on the 380 or the 310.

Cheers Roy.--- In ultralightdx@..., "sdwillingham" wrote:
>
>
>
>
> Roy,
>
> A clarification: the code in the reference design I linked to
> is actually operating the chip in 3-wire mode. It nicely makes
> use of the MCU's SPI interface hardware, but the incoming and
> outgoing serial data lines are actually connected together with
> a 1 kohm resistor (see the schematic in the app note).
>
> I actually used a version of that code example in the first
> version of my interface. That said, I'm back to bit-banging
> with my current software.
>
> Yesterday, one of these arrived at my house from Mouser:
>
> http://www.silabs.com/Support%20Documents/TechnicalDocs/ToolStick_F321_DC_UG.pdf
>
> It's quite a lot bigger than my present prototype, but should be
> easier to work with in terms of solder points, etc. Last night
> I determined that if I cut off the bottom third of the board
> (where the potentiometer and switch are), I will be able to fit
> the remainder inside my PL-380. (These Tecsuns are remarkable
> in their packaging design -- very little wasted space and yet
> very easy to dis- and re-assemble.) The PL-380's built-in USB
> connector will make this a very stealth modification!
>
> -Scott-
>
> --- In ultralightdx@..., "Roy" roy.dyball@ wrote:
>
> > Because the Tecsun uses the 3 wire interface I feel it is best to stick
> > with it while they use it because I can unhook my interface, and as soon
> > as I switch the local MCU control lines back in it takes over without a
> > fuss and you can still use any changes you have made until power down
> > while using the radio normally.
> >
> > I am really leaning toward using an MCU like you are doing and am
> > looking forward to seeing your final results. I noticed you have posted
> > more pictures and your radio with interface looks good now it is back
> > together.
> >
>


sdwillingham
 

Roy,

I am using the daughterboard-only for my interface within the
radio. The base adapter, however, provides an interface for two
things: 1) Downloading programs to flash memory. 2) It has
a very slick 2-wire interface to the MCU which is used for
in-circuit debugging. With the development tools, you can
run/stop/trace your code graphically.

The daughtercards are available separately for about $10 each.
I think the base adapter is $15-20. I bought one of each.
You probably want to buy the "getting-started" kit first,
however, to get all the software tools. Just add the -F321
daughtercard separately.

I use a full version of the Keil compiler. The same compiler
is used in the Silabs kits, but is a restricted version (I think
it mainly restricts program size to 2kB). Right now, I am not
using the development-kit IDE. Instead, I use the compiler with
Gnu-make and some complex Makefiles developed by our firmware
group. (The same compiler is used for the Si47XX internal MCU
firmware.)

Regarding USB code, my interface uses the code from the
reference design Zip that I linked to earlier in this thread.
This code uses a standard HID interface to the PC, so there are
no drivers needed. Some PC-side C-code examples can be found
in that zip file too. (Just disregard the complicated
audio-streaming code and refer to the control/command code.)
I have not done any programming on the PC side, however,
because I'm able to use the Silabs standard Si47xx evaluation
GUI on that side.

On the daughtercard side, I'm sure I can help you get the basic
USB communication going, which is 90% of the code. (And the
code I'm using is barely modified from the code that's already
publically available.) Only about 10% of my code deals with
the EVB/GUI command set and communication with the radio chip.

-Scott-

--- In ultralightdx@..., "Roy" <roy.dyball@...> wrote:


Scott

Thank you for putting me straight about the SPI connection to the MCU.

Am I correct in assuming that you are only using the daughter board
alone and not the base board connected to the daughter board? Is the
daughter board available on its own from Mouser?

Scott what version of C are you using. Is the Si labs development
environment and tools all one would need to get an interface working
with the ability to slot in my own code? Are the PC-USB libraries
included in the development environment?

I will probably order one of these MCU boards and have a go. There goes
another life time LOL. I will look forward to your results with the new
board. I also thought it made good sense to utilise the existing USB
connector on the 380 or the 310.

Cheers Roy.--- In ultralightdx@..., "sdwillingham"
<sdwillingham@> wrote:




Roy,

A clarification: the code in the reference design I linked to
is actually operating the chip in 3-wire mode. It nicely makes
use of the MCU's SPI interface hardware, but the incoming and
outgoing serial data lines are actually connected together with
a 1 kohm resistor (see the schematic in the app note).

I actually used a version of that code example in the first
version of my interface. That said, I'm back to bit-banging
with my current software.

Yesterday, one of these arrived at my house from Mouser:

http://www.silabs.com/Support%20Documents/TechnicalDocs/ToolStick_F321_D\;
C_UG.pdf

It's quite a lot bigger than my present prototype, but should be
easier to work with in terms of solder points, etc. Last night
I determined that if I cut off the bottom third of the board
(where the potentiometer and switch are), I will be able to fit
the remainder inside my PL-380. (These Tecsuns are remarkable
in their packaging design -- very little wasted space and yet
very easy to dis- and re-assemble.) The PL-380's built-in USB
connector will make this a very stealth modification!

-Scott-

--- In ultralightdx@..., "Roy" roy.dyball@ wrote:

Because the Tecsun uses the 3 wire interface I feel it is best to
stick
with it while they use it because I can unhook my interface, and as
soon
as I switch the local MCU control lines back in it takes over
without a
fuss and you can still use any changes you have made until power
down
while using the radio normally.

I am really leaning toward using an MCU like you are doing and am
looking forward to seeing your final results. I noticed you have
posted
more pictures and your radio with interface looks good now it is
back
together.


just_rtfm
 

howdy Roy!

i am a big fan of BASIC compilers and tiny interpreters, as in Tom Pittman or Li Chen Wang. i do C and C++ but prefer assembly (MASM32 under WinAPI): where parameters are DWORD's. if i want to cast, i'll go fly-fishing. i do VHDL too.

I would gladly do that for you but my G8 with the interface
has the Si4734 removed at the moment.
thank you Roy.

mov eax, 0
ret
phil :)


sdwillingham
 

Some additional comments:

1) It looks like you can download all the development software
without buying a starter kit.

2) The Keil demo compiler is normally limited to 2 kB compiled
object code. When you buy any of the Silabs toolstick cards,
there is a serial number on the box which can be used to upgrade
the demo to 4 kB code. I think that might be enough to get
reasonable functionality up. My code right now compiles to
nearly 8 kB, but it has quite a bit of extra functionality
that is probably not generally needed.

Other than that, actually purchasing a full copy of the Keil
compiler seems out of the question (thousands of dollars!).
The Silabs IDE also supports the free SDCC compiler, but
I have not used it. I know it is used within Silabs on some
projects, so it's a capable compiler. The big disadvantage
is that the example USB code is meant for the Keil compiler.
I'm not sure how hard it is to port to SDCC.

The Silabs web site has lots of application support for the
MCU chips. I encourage you to check it out.

-Scott-

--- In ultralightdx@..., "sdwillingham" <sdwillingham@...> wrote:



Roy,

I am using the daughterboard-only for my interface within the
radio. The base adapter, however, provides an interface for two
things: 1) Downloading programs to flash memory. 2) It has
a very slick 2-wire interface to the MCU which is used for
in-circuit debugging. With the development tools, you can
run/stop/trace your code graphically.

The daughtercards are available separately for about $10 each.
I think the base adapter is $15-20. I bought one of each.
You probably want to buy the "getting-started" kit first,
however, to get all the software tools. Just add the -F321
daughtercard separately.

I use a full version of the Keil compiler. The same compiler
is used in the Silabs kits, but is a restricted version (I think
it mainly restricts program size to 2kB). Right now, I am not
using the development-kit IDE. Instead, I use the compiler with
Gnu-make and some complex Makefiles developed by our firmware
group. (The same compiler is used for the Si47XX internal MCU
firmware.)

Regarding USB code, my interface uses the code from the
reference design Zip that I linked to earlier in this thread.
This code uses a standard HID interface to the PC, so there are
no drivers needed. Some PC-side C-code examples can be found
in that zip file too. (Just disregard the complicated
audio-streaming code and refer to the control/command code.)
I have not done any programming on the PC side, however,
because I'm able to use the Silabs standard Si47xx evaluation
GUI on that side.

On the daughtercard side, I'm sure I can help you get the basic
USB communication going, which is 90% of the code. (And the
code I'm using is barely modified from the code that's already
publically available.) Only about 10% of my code deals with
the EVB/GUI command set and communication with the radio chip.

-Scott-

--- In ultralightdx@..., "Roy" <roy.dyball@> wrote:


Scott

Thank you for putting me straight about the SPI connection to the MCU.

Am I correct in assuming that you are only using the daughter board
alone and not the base board connected to the daughter board? Is the
daughter board available on its own from Mouser?

Scott what version of C are you using. Is the Si labs development
environment and tools all one would need to get an interface working
with the ability to slot in my own code? Are the PC-USB libraries
included in the development environment?

I will probably order one of these MCU boards and have a go. There goes
another life time LOL. I will look forward to your results with the new
board. I also thought it made good sense to utilise the existing USB
connector on the 380 or the 310.

Cheers Roy.--- In ultralightdx@..., "sdwillingham"
<sdwillingham@> wrote:




Roy,

A clarification: the code in the reference design I linked to
is actually operating the chip in 3-wire mode. It nicely makes
use of the MCU's SPI interface hardware, but the incoming and
outgoing serial data lines are actually connected together with
a 1 kohm resistor (see the schematic in the app note).

I actually used a version of that code example in the first
version of my interface. That said, I'm back to bit-banging
with my current software.

Yesterday, one of these arrived at my house from Mouser:

http://www.silabs.com/Support%20Documents/TechnicalDocs/ToolStick_F321_D\;
C_UG.pdf

It's quite a lot bigger than my present prototype, but should be
easier to work with in terms of solder points, etc. Last night
I determined that if I cut off the bottom third of the board
(where the potentiometer and switch are), I will be able to fit
the remainder inside my PL-380. (These Tecsuns are remarkable
in their packaging design -- very little wasted space and yet
very easy to dis- and re-assemble.) The PL-380's built-in USB
connector will make this a very stealth modification!

-Scott-

--- In ultralightdx@..., "Roy" roy.dyball@ wrote:

Because the Tecsun uses the 3 wire interface I feel it is best to
stick
with it while they use it because I can unhook my interface, and as
soon
as I switch the local MCU control lines back in it takes over
without a
fuss and you can still use any changes you have made until power
down
while using the radio normally.

I am really leaning toward using an MCU like you are doing and am
looking forward to seeing your final results. I noticed you have
posted
more pictures and your radio with interface looks good now it is
back
together.