JD Custom LC2 (iss1) Eprom conversion - TC9119

Discussions on CB Radio Modifications
Post Reply
User avatar
Warf135
Light User
Light User
Posts: 151
Joined: Saturday 18th Oct 2008, 8:36
Location: cornwall, uk
Contact:

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by Warf135 »

Thanks for that explanation, I dont think i'll be able to work out the programming myself... (sounds like it will be a lots of maths involved lol)

I'll see if i can find anyone who has a dump from a working one, or if i can find a working one somewhere, although i don't hold out much hope of that :P
Norm
lbcomms
Technical Helper
Technical Helper
Posts: 157
Joined: Monday 27th Feb 2006, 22:57
Location: Australia

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by lbcomms »

Where's the fun in that? :D
sounds like it will be a lots of maths involved
Hex 101:

Numbers in computers (and radios!) are represented by voltages on wires - these can either be off (low) or on (high).
By putting different voltages on different wires, we can "change" things (such as our operating frequency).

It's a bit hard to read if written down as highs and lows (what is HHLHHLLHHHHLLLHH?)

To make things a bit easier to read, we use HEX. This groups them into sets of 4 wires, each one called a HEX DIGIT.
Because there are 16 combinations of highs and lows for each digit, the digits 0 to 9 are not enough, so A, B, C, D, E, and F are added.

LLLL = 0
LLLH = 1
LLHL = 2
LLHH = 3
LHLL = 4
LHLH = 5
LHHL = 6
LHHH = 7
HLLL = 8
HLLH = 9
HLHL = A
HLHH = B
HHLL = C
HHLH = D
HHHL = E
HHHH = F

The first letter has a "weighting" of 8 if high.
The second letter has a "weighting" of 4 f high.
The third letter has a "weighting" of 2 if high.
The last letter has a "weighting" of 1 if high.

Therefore, LHLH is equal to 0 + 4 + 0 + 1, in other words, 5.

Your EPROM has 12 addresses (inputs) and 8 data lines (outputs).

We need one hex letter for each 4 wires, so you need 3 digits for the address and 2 digits for the data.
So, if address 201 is programmed to give out a data value of 7F, this means that:
Putting the input lines to LLHL LLLL LLLH will cause the output lines to change to LHHH HHHH.

Get it?

Image

Here's a typical "hex switch". Note that there are 5 pins: the common supply (C) and the 4 outputs marked 1, 2, 4, and 8.
Put 5 volts onto "C"and select position "5". #8 will be 0V, #4 will be 5V, #2 will be 0V, and #1 will be 5V.

Complicated maths? Not really, if you have 2 switches like the one above. Connect them to the PLL and make a chart as to what code gives what frequency.
Use a multimeter to see what the addresses are. Program EPROM and enjoy your radio...

Hope this helps - let us know if you didn't understand any bits it.

Cheers
User avatar
Warf135
Light User
Light User
Posts: 151
Joined: Saturday 18th Oct 2008, 8:36
Location: cornwall, uk
Contact:

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by Warf135 »

Thanks once again for an interesting and detailed reply.

I understand about working out what code is required to get the output PLL to change frequencies, but I don't understand how to convert the code coming in to the code thats needed coming out.

so if the input for ch1 would be HLLLLHHH and the output needs to be LHLLLHHH for example, how do you tell the eprom to convert it? and it would be different for each channel, thats what i dont get :|

ps. (what is HHLHHLLHHHHLLLHH?) its D9E3 :lol:
Norm
lbcomms
Technical Helper
Technical Helper
Posts: 157
Joined: Monday 27th Feb 2006, 22:57
Location: Australia

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by lbcomms »

Here's the pinout of the EPROM:
Image

The address lines are the inputs to the EPROM.
The first digit (thousands) is A12. This can only be high (1) or low (0).
The next digit (hundreds) is A8, A9, A10, and A11, so this can be 0 through to F.
The next digit (tens) is A4, A5, A6, and A7, so this can be 0 through to F.
The next digit (units) is A3, A2, A1, and A0, so this can be 0 through to F.
Therefore, the INPUT or addresses range is from 0000 to 1FFF.

The data lines are the outputs from the EPROM.
The first digit (tens) is D4, D5, D6, and D7, so this can be 0 through to F.
The last digit (units) is D3, D2, D1, and D0, so this can be 0 through to F.
Therefore, the OUTPUT or data range is from 00 to FF.

The other pins are used for programming and for multi-EPROM circuits, ignore these. Connect them to ground, except for NC pins which are left unconnected.

It's easier to understand if you ignore pinout and unused lines in the schematic:
Image

If the PLL wanted 6F for FCC channel 1 RX and AE for TX (more on how to do this further on) then the EPROM DATA has to be 6F and AE.

Put your radio to FCC mode and the channel selector on channel 1. Measure the voltages on the channel selector pins that go to the addresses.

If it is, for example, 002A on receive, this will be 102A on transmit (because the 5V TX line goes to A12 in the above circuit, adding +1000).

With the EPROM programmer, program 6F into address 002A and AE into address 102A.
Repeat the measurements and programming for all other channels.

Result: when the FCC mode is selected and the selector is turned to channel 1, the EPROM gives out 6F and the radio receives on that channel!

There are 2 ways of working out the DATA codes needed.

Method 1: use a couple of hex thumbwheels:
Image

Set the thumbwheels to the halfway mark (80), Radio should lock OK. Write down frequency.
Set it to 81 and measure again. It should have moved by 5 or 10 Khz. This is your step.
You can now make a chart from 00 to FF showing all 256 combinations, by simple derivation.
For example, if 80 gave 27.305 and 81 gave 27.315, it follows that 82 must be 27.325 and 83 gives 27.335, and so on.

Method 2: use good old mathematics :shock: You'll need to know the downmix and reference frequencies before you can do this.
Example: Radio uses 10Khz reference and a 15.360 downmix. Calculate code for FCC channel 40 RX (27.405 Mhz):

VCO = RF - IF, so VCO = 27.405-10.695 which is 16.71 Mhz.
Fin = VCO - Downmix, so Fin = 16.71 - 15.36 = 1.35 Mhz.
The next step requires Khz, not Mhz, so multiply by 1000 to get Khz: 1.35 x 1000 = a value of 1350 Khz for Fin.
NCode = Fin / Ref. 1350 divided by 10 = 135.

135 is the decimal value, NOT the hex value our EPROM programmer wants.
Use the Windows calculator accessory (change it from Standard to Scientific view) to convert:
135 decimal = 87 hex. Therefore we program 87 into the EPROM to hit 27.405 at the address combination we wand to make the radio go to 27.405.

You can now make a chart from 00 to FF showing all 256 combinations, by simple derivation.
For example, 86 should give 27.395 and 85 should give 27.385, and so on.


Because the reference and downmix cannot be easily determined in many cases, I prefer method 1.
I keep a pair of thumbwheels soldered to the data pins of a 28 pin EPROM socket to do this. Total cost was under $20.

Hope I explained it clearly enough :D

Cheers
User avatar
Warf135
Light User
Light User
Posts: 151
Joined: Saturday 18th Oct 2008, 8:36
Location: cornwall, uk
Contact:

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by Warf135 »

Ah, ok! I think my tiny brain get it now lol!

The inputs from the channel selector to eprom are address and the output to the PLL are data, so that when the input address is xxxxxxxx the output data is set to xxxxxxxx

So, getting the address data should be easy, by using a PLL truth chart for the TC9119 PLL chip (or testing it with voltmeter a you suggest).
The output data in theory could be found by using a truth chart for the MC145106 PLL chip... as for EU band the standard 1-40 of the MC145106 would be required.
But then i would have to work out how to get it to do the UK frequencies snooze :?

it would be a lot easier to buy a new eprom board :lol:
Norm
lbcomms
Technical Helper
Technical Helper
Posts: 157
Joined: Monday 27th Feb 2006, 22:57
Location: Australia

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by lbcomms »

The output data in theory could be found by using a truth chart for the MC145106 PLL chip
No, as this can change for different radio designs.

Old school PLLs like the MC145106 were not fast enough to directly control the VCO frequency, so downmixing had to be used so that the thing could work.

Code: Select all

RF mixers 101:

When 2 frequencies are combined at a non-linear junction (i.e. a diode or transistor) the result is FOUR frequencies - the original 2, the "sum" (both added), and the "difference" (the highest one minus the lowest one).
For example, mixing a 20 Mhz signal and a 25 Mhz signal results in a 5 Mhz signal (25-20) and a 45 Mhz signal (20 + 25) being created.
A filter of some sort always follows a mixer, to remove the unwanted signals.

For example, if we only wanted to keep the 5 Mhz one, a 10Mhz low pass filter would allow it to pass but block out the 20, 25 , and 45 Mhz ones.
In this case, it is called "downmixing" because we have created a new lower frequency that is relative to the ones that created it.
If our 25 Mhz signal drops by 0.1 Mhz to 24.9, then our output will also drop by the same amount (in this case, to 4.9 Mhz).
The MC145106 tops out at 4 Mhz, and our 27 meg radio needs much higher.
Most 27 meg radios use an IF of 10.695 Mhz, which needs an oscillator of 27 megs - 10.695 (for RX, to keep it simple, TX is a bit different)
To receive FCC channel 40 you need a 16.71 Mhz oscillator (27.405 - 10.695).

16.71 is more than the 4 Mhz the MC145106 can handle, see a problem? :shock:

A downmixer is used (the EPROM board uses 15.360) to overcome this.
The 3 transistors and the associated components are the downmixer.
The 10.24 is halved then tripled which gives 15.360 Mhz. This is then downmixed with 16.71 to give 1.35 Mhz which our PLL can handle.
Note that the PLL never "sees" the 16.71 Mhz directly.
Therefore, there can be no standard "truth chart for the MC145106 PLL chip".
it would be a lot easier to buy a new eprom board
But a lot more educational to learn how to do it yourself :D

I''d be buying a couple of hex switches and wiring them to the data lines and working out the codes for myself...

Cheers
lbcomms
Technical Helper
Technical Helper
Posts: 157
Joined: Monday 27th Feb 2006, 22:57
Location: Australia

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by lbcomms »

Cheap hex switches in the UK:
http://www.ebay.co.uk/itm/HEX-RED-KNOB- ... 19c17d7bac

Mount them on some perf board and wire them to the (with the EPROM now removed) EPROMs data connections.
Or, if the EPROM was mounted in a 28 pin socket, wire the switches directly to a new socket. This can then be plugged into the existing socket.

You''ll need to add a few resistors and a capacitor, that's easy enough though.

You'll have the data coding worked out, and know how capable the radio is (i.e. it's usable bandwidth) in no time. :)

If you do that, I'll show you how to write a new hex file that you can send to Dave and have him program a new EPROM for you.

You will then know exactly how this stuff works and know how to fix it if something doesn't operate as expected.

Enjoy...
User avatar
Warf135
Light User
Light User
Posts: 151
Joined: Saturday 18th Oct 2008, 8:36
Location: cornwall, uk
Contact:

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by Warf135 »

it sounds like a do-able project, though i have a few other projects on the go first so it this will have to wait till i can clear some space on my workbench...

I did look at those hex switches this morning funny enough and nearly bought them then... I have plenty of vero board here so could make up a hex switch circuit easily. I know that the common of each hex switch will need to be fed with about 5v so it can pull the PLL high when on or low when off, where do the resistors and capacitor come into it?

I did also have a quick look last night about making a homebrew eprom programmer that plugs into computer, but as i'll only probably be doing one eprom with it, it may not be worth it.
Norm
lbcomms
Technical Helper
Technical Helper
Posts: 157
Joined: Monday 27th Feb 2006, 22:57
Location: Australia

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by lbcomms »

where do the resistors and capacitor come into it?
It depends on the switch design - there are 2 types of hex switch.

I only showed the least common type before as it's easier to understand.
These have the common connected to +5V and the outputs are used directly.

There is one problem with that approach - what happens if one of the switch outputs is shorted to ground (faulty component, wiring mistake, solder splash, etc)?
Hopefully the supply limits the current, or things are going to get hot (melted switches and wiring, anyone?).

Most hex switches are inverted - so a pullup resistor to +5V (typically 10K) for each output is used. The common of the switch connects to ground.
This "pulls up" the output to 5V when it's open, and forces it to 0V when it's closed.
Switch position 0 = all closed, which gives LLLL.
Switch position F = all open, which gives HHHH.

So the end result is exactly the same, but if there is a short to ground, current is limited to half a milliamp (5V / 10,000 ohms).
The circuit still won't operate correctly, but no permanent damage occurs.

The listing didn't say what type of hex switch it was, so the placement of the resistors would have to be shown after you buy the switch and do a multimeter measurement on them.
Either type will work for you, they are just wired up a slightly different way.

The capacitor is a simple common to supply bypass, to remove any residual hum, RF, etc. If there is another nearby bypass cap, you can probably get away without this component.

Cheers
User avatar
Warf135
Light User
Light User
Posts: 151
Joined: Saturday 18th Oct 2008, 8:36
Location: cornwall, uk
Contact:

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by Warf135 »

I found some mini hex switches like this:
Image

so i built this little circuit:
Image

The mini hex switches are not inverted, so i have added a 10k resistor to each output pin.

If i build another one i would probably use coloured ribbon cable rather than the grey, but hey-ho, it should do the job ok... now i just gotta clear some jobs off my bench so i can get the radio back on there...
Norm
lbcomms
Technical Helper
Technical Helper
Posts: 157
Joined: Monday 27th Feb 2006, 22:57
Location: Australia

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by lbcomms »

First of all, make sure they are not inverted - when the switches are at position "0", there should be NO connection between any of the pins (assuming they are 5 pin switches).
If they have more than 5 pins, there should be NO connection between any of the output pins at position "0".

Repeat the above at position "F", all of the pins should now be joined.

When you are 100% sure the above is correct, here's where the resistors and capacitor go:

Image

You should now be able to derive the radio's hex codes.
Bear in mind that the codes will be different for RX and TX.

Make sure that FS (pin 6 of the MC145106) is at 0V (this should give 5K steps).

Make sure that P8 (pin 9 of the MC145106) is at 5V initially.
Making this 0V will drop the radio by 1.28 Mhz.

Have fun...
User avatar
Warf135
Light User
Light User
Posts: 151
Joined: Saturday 18th Oct 2008, 8:36
Location: cornwall, uk
Contact:

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by Warf135 »

First of all, make sure they are not inverted - when the switches are at position "0", there should be NO connection between any of the pins (assuming they are 5 pin switches).
Yes they are 5 pin switches and they are not inverted as i said in my last post. I tested the switches at 00, FF and 55 when i got them as they were not listed as hex switches, but as alpha-numeric switches so i tested them to make sure they were actually hex switches.

wiring in the manner you show, is how i would have wired the switches (but with + and - reversed) if the switches were inverted. I thought the resistors were there to protect the 5v supply if one of the output pins was accidentally grounded, thats why i wired a resistor in series with each output pin... in the diagram above there is no protection if one of the output pins is shorted (unless i'm missing something)
Norm
lbcomms
Technical Helper
Technical Helper
Posts: 157
Joined: Monday 27th Feb 2006, 22:57
Location: Australia

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by lbcomms »

That's correct, and why inverted (common to ground) switches are used on most real-world applications.
If you want to play safe, put a low value resistor (say 68 ohms) in the 5V line that feeds both switches, this will limit the current to a safe value (about 75mA) in the event of a short.

Cheers
User avatar
Warf135
Light User
Light User
Posts: 151
Joined: Saturday 18th Oct 2008, 8:36
Location: cornwall, uk
Contact:

Re: JD Custom LC2 (iss1) Eprom conversion - TC9119

Post by Warf135 »

Wow i cant believe a month has gone by and i haven't got round to actually wiring the Hex Switches into the radio yet... Unfortunately this Audioline homebase has to take a back seat, as more important stuff has to be done first. (i have at least re-wired the hex switches, so they are correct now!)

Hopefully, I'll be able to get to it soon :roll: (don't hold your breath :lol: )
Norm
Post Reply