uPD2824 PLL expander concept / first prototype

A forum for the discussion of matters of a technical nature. All such activities are undertaken at the readers discretion and own risk. If you don't know what you are doing, don't blame us if it all goes wrong!
lbcomms
Radio Addict
Radio Addict
Posts: 505
Joined: 04 Oct 2015, 08:10
Location: Sydney, Australia

Re: uPD2824 PLL expander concept / first prototype

Post by lbcomms »

cjay wrote:Maybe set the code protect too, at least until you're ready to release
Didn't bother with code protection, without knowing what the hardware chips are or access to the source code, he's not going to be able to do much at all. If he actually works out how to read the binary back (i.e. using something like avrdude) there's a small text string in there waiting for him :)
lbcomms
Radio Addict
Radio Addict
Posts: 505
Joined: 04 Oct 2015, 08:10
Location: Sydney, Australia

Re: uPD2824 PLL expander concept / first prototype

Post by lbcomms »

Mattylad wrote:Can I ask what software you intend to use for schematic\pcb layout?
At this stage the schematic is only hand drawn. At the shop we have Altium (Protel), Eagle, and a few minor / free ones, such as Designspark and FreePCB. Any of those could be used, but we will probably use a free or low cost one that others can get easily / legally in the event they want to add or change things...
User avatar
Admiral
Legend
Legend
Posts: 10108
Joined: 08 Mar 2011, 21:20
Call Sign: 26TM157
Location: MK-UK

Re: uPD2824 PLL expander concept / first prototype

Post by Admiral »

lbcomms wrote: If he actually works out how to read the binary back (i.e. using something like avrdude) there's a small text string in there waiting for him :)
Ha, classic, I won't ask, but I bet it's a tad rude.
Winner of the 2017 IBTL 'Summer Sizzler' competition
lbcomms
Radio Addict
Radio Addict
Posts: 505
Joined: 04 Oct 2015, 08:10
Location: Sydney, Australia

Re: uPD2824 PLL expander concept / first prototype

Post by lbcomms »

TM86 wrote:I've been working on something similar for Cobra 2000 off and on, mostly off, for a while now, based on earlier work I did to revive an SBE Console V. Your solution is far more elegant than the brute force methods I've been using
I've seen a few similar concepts, both here and online, ranging from a boardful of discrete 45xx/74xx logic, EPROMs, PICs, and everything in between. What "brute force" were you playing with?
lbcomms
Radio Addict
Radio Addict
Posts: 505
Joined: 04 Oct 2015, 08:10
Location: Sydney, Australia

Re: uPD2824 PLL expander concept / first prototype

Post by lbcomms »

Admiral wrote:I won't ask, but I bet it's a tad rude
No, clean but slightly sarcastic :D
User avatar
cjay
Top Poster
Top Poster
Posts: 1775
Joined: 06 Jun 2013, 21:21
Call Sign: cjay
Location: Manchester
Contact:

Re: uPD2824 PLL expander concept / first prototype

Post by cjay »

lbcomms wrote:
Admiral wrote:I won't ask, but I bet it's a tad rude
No, clean but slightly sarcastic :D
I like a nice easter egg :)
TM86
Regular
Regular
Posts: 40
Joined: 13 Jul 2015, 02:04
Call Sign: 2TM86

Re: uPD2824 PLL expander concept / first prototype

Post by TM86 »

lbcomms wrote:
TM86 wrote:I've been working on something similar for Cobra 2000 off and on, mostly off, for a while now, based on earlier work I did to revive an SBE Console V. Your solution is far more elegant than the brute force methods I've been using
I've seen a few similar concepts, both here and online, ranging from a boardful of discrete 45xx/74xx logic, EPROMs, PICs, and everything in between. What "brute force" were you playing with?
So you know what you're dealing with, the SBE was my first Arduino project, the 2000 is my second.

I'm using an Arduino pro-mini with 2 MCP23017's, one for input and one for output. I set up an array for the channel selector and another array for the desired output to the PLL. The idea is, to translate to the physical world, like having a 40 tooth gear meshed with a 128 tooth gear. Crude, but effective.

I was getting, for lack of a better word, "interesting" results when using the radio's channel selector. Which is why I set it aside for a while. Since your post the other day, I've been trying to suss out interrupts. That and some small caps for debouncing input and I may have something that works. For rather primitive values of work.
Mattylad
Top Poster
Top Poster
Posts: 1536
Joined: 03 May 2014, 20:09
Call Sign: RDX64
Location: Lancashire

Re: uPD2824 PLL expander concept / first prototype

Post by Mattylad »

lbcomms wrote:
Mattylad wrote:Can I ask what software you intend to use for schematic\pcb layout?
At this stage the schematic is only hand drawn. At the shop we have Altium (Protel), Eagle, and a few minor / free ones, such as Designspark and FreePCB. Any of those could be used, but we will probably use a free or low cost one that others can get easily / legally in the event they want to add or change things...
OK cheers.
PCB's are available from seeedstudio when your done, you can even share it on there so people can just buy the board.f you need a hand with the CB let me know - (its my day job).
lbcomms
Radio Addict
Radio Addict
Posts: 505
Joined: 04 Oct 2015, 08:10
Location: Sydney, Australia

Re: uPD2824 PLL expander concept / first prototype

Post by lbcomms »

TM86 wrote:I was getting, for lack of a better word, "interesting" results when using the radio's channel selector
We initially - on the first "breadboard" version - just used some general purpose I/O pins, such as port B or D on a Mega644 dev board, but got very inconsistent results. What worked in a fashion on one switch was all over the place on another one, even if it was the same type. There was too much noise and contact bounce, and the loop keeping track of all the input pins was too much for the AVR to handle. Large bypass caps (330nF) made it more reliable (though still not reliable enough for a commercial product), and slowed down the maximum turn rate - quickly turning a 40 position switch half a turn resulted in the encoded value changing by 2 to 5 steps. Another approach was needed.

Enter the PCF8574, an I2C/TWI to 8 bit parallel general purpose I/O expander. We already had I2C used on the board for the display driver and the EEPROM that remembers the last channel selected, so using that chip for input freed up a whole 8 bit port.

The PCF8574 has another useful feature though, it can generate an interrupt. Pin 13 is an open drain (pull-up resistor needed) output that goes high when the micro reads the chips port pins as input, and it stays high until any of its input pins changes state, then it drops low.

The micro now only has to keep track of a single input pin (connected to pin 13 of the PCF8574) to keep track of the channel switch, mode switch, and the PTT inputs. When it detects this pin goes low, it reads the I2C bus at the address of the input port chip. This releases the interrupt pin (it goes back high again) and the change can be processed. While the interrupt pin is high, nothing else is happening. It then waits until the interrupt pin goes low again, and the process repeats...
lbcomms
Radio Addict
Radio Addict
Posts: 505
Joined: 04 Oct 2015, 08:10
Location: Sydney, Australia

Re: uPD2824 PLL expander concept / first prototype

Post by lbcomms »

Mattylad wrote:PCB's are available from seeedstudio when your done
I've never used them, are they a PCB fabricator? We used to get boards made locally here in Sydney, but all of the ones we used have now closed down.

These days, we get boards made in China, by places such as Sure electronics or Futurelec. They are a quarter to a tenth of what the local fab houses used to charge us, even with shipping taken into account.
f you need a hand with the CB let me know - (its my day job)
We run a small radio shop over here, but 99% of our work is business equipment (two way radio, telemetry, and data links) with a little government and broadcast work thrown in. We take on just one or two CB and hobby type jobs a week just to keep thing interesting.

I get on air only rarely, too many desperadoes with comments such a "on ya back b1t<h" and "get back in the kitchen" to get a sensible conversation out there. The ham bands are the worst...
User avatar
Admiral
Legend
Legend
Posts: 10108
Joined: 08 Mar 2011, 21:20
Call Sign: 26TM157
Location: MK-UK

Re: uPD2824 PLL expander concept / first prototype

Post by Admiral »

I suspect the 'CB' reference may have been 'circuit board'.
Winner of the 2017 IBTL 'Summer Sizzler' competition
lbcomms
Radio Addict
Radio Addict
Posts: 505
Joined: 04 Oct 2015, 08:10
Location: Sydney, Australia

Re: uPD2824 PLL expander concept / first prototype

Post by lbcomms »

Possibly, wasn't sure as on another thread I was asking for help with buying a Superstar or similar AM/FM/SSB, thought it may have been referring to that. I've always used "PCB" to refer to a circuit board...
User avatar
cjay
Top Poster
Top Poster
Posts: 1775
Joined: 06 Jun 2013, 21:21
Call Sign: cjay
Location: Manchester
Contact:

Re: uPD2824 PLL expander concept / first prototype

Post by cjay »

lbcomms wrote: Enter the PCF8574, an I2C/TWI to 8 bit parallel general purpose I/O expander. We already had I2C used on the board for the display driver and the EEPROM that remembers the last channel selected, so using that chip for input freed up a whole 8 bit port.

The PCF8574 has another useful feature though, it can generate an interrupt. Pin 13 is an open drain (pull-up resistor needed) output that goes high when the micro reads the chips port pins as input, and it stays high until any of its input pins changes state, then it drops low.

The micro now only has to keep track of a single input pin (connected to pin 13 of the PCF8574) to keep track of the channel switch, mode switch, and the PTT inputs. When it detects this pin goes low, it reads the I2C bus at the address of the input port chip. This releases the interrupt pin (it goes back high again) and the change can be processed. While the interrupt pin is high, nothing else is happening. It then waits until the interrupt pin goes low again, and the process repeats...
I was wondering about the two different I2C I/O chips, the MCP23017 is also capable of generating an interrupt on change, is there another reason for the two different chips?
lbcomms
Radio Addict
Radio Addict
Posts: 505
Joined: 04 Oct 2015, 08:10
Location: Sydney, Australia

Re: uPD2824 PLL expander concept / first prototype

Post by lbcomms »

Two reasons, cost and PCB space.

A local contract PCB loader business offered us a few hundred 8574 chips that had been ordered by mistake - they meant to order the 8574A variant and got the non suffixed version instead. The only difference is the soft address, easily changed in code, but that wasn't an option for them as they were just building someone else's product from a parts list and procedure. Their supplier wouldn't take them back, so they offered them to us at 25 cents each (I think that's about 10p in your money). Sold!

They are a bit smaller (16 pin as opposed to 28), which would help in getting the final version PCB as small as possible.

We used the 23017 as the display output driver because the 8574 can only source about 3mA (the 23017 has no problem supplying 15 or 20), common cathode displays would have been a bit too dim...
User avatar
cjay
Top Poster
Top Poster
Posts: 1775
Joined: 06 Jun 2013, 21:21
Call Sign: cjay
Location: Manchester
Contact:

Re: uPD2824 PLL expander concept / first prototype

Post by cjay »

lbcomms wrote:Two reasons, cost and PCB space.

A local contract PCB loader business offered us a few hundred 8574 chips that had been ordered by mistake - they meant to order the 8574A variant and got the non suffixed version instead. The only difference is the soft address, easily changed in code, but that wasn't an option for them as they were just building someone else's product from a parts list and procedure. Their supplier wouldn't take them back, so they offered them to us at 25 cents each (I think that's about 10p in your money). Sold!
Ah, a very good reason, I do like 'cheap stuff', drawers full of tubes of chips which 'will be useful' one day :)
lbcomms wrote: They are a bit smaller (16 pin as opposed to 28), which would help in getting the final version PCB as small as possible.

We used the 23017 as the display output driver because the 8574 can only source about 3mA (the 23017 has no problem supplying 15 or 20), common cathode displays would have been a bit too dim...
That was the other reason I couldn't work out why there were two chips, the 23017 seems a 'better' solution all round other than the size, even then I'd maybe have had the extra outputs for 'expansion' at the expense of a little board space.

Still looking forward to seeing the final 'product'
Post Reply