Two questions

marcos.placona

Senior Member
Hi guys, here's me again with two questions.

I think they should be pretty straight forward, but here we go.

First, I was checking some circuit samples here at the forum, and found this one to be pretty neat:



Well, my question is not really related to the circuit, as it's pretty straight forward, but I wanted to ask you about the pins being used. They make like so much easier, as as far as I understood, you can connect wires to them, the same way as you do on the breadboard, which would make my life easier when having to disconnect my board from my project, as I would just take off all the wires connected to the ping, make my modifications and put the wires back and they can also be connected to the bread board.
But I don't know how to refer to it, or how to look for it. Is there as special name for that? I tried socket strip, but no luck. Can anybody tell me what is the name of that?

The second question would be regarding a way to expand the I/O ports on the 08M. I found a way to do that by using a 74HC595, but my supplier doesn't have it, so I wanted to know of any similar IC I could use to do that.

Thanks in advance,

Marcos Placona
 

marcos.placona

Senior Member
Hi Rick, thank for your answer, I'll take a look at the 4017

And regarding the SIL Sockets, can they be normally connected to the breadboard if necessary? I mean, are they long enough? And can they have a wire inserted into it?

Cheers
 

Dippy

Moderator
My Ebay glasses may be failing but they look more like 'wirewrap' headers to me...?

You can get wirewrap as DIL/DIP or as a SIL which you can chop off to suit.
I used to use them when making home-made multi-layer boards as you can solder top'n'bottom.
 

kranenborg

Senior Member
An alternative solution for expanding the IO capability of a 08m could be to use a MC23S17 SPI-based I/O expander (16 IO, or 8 for the smaller MCP23S08). You have to bit-bang the SPI interface yourself (see www.phanderson.com for examples, or maybe on this forum as well) as the 08M does not have any protocol for that. You can get the chips via Mouser, but you could sample a few directly via microchip too.

This option is useful for more advanced I/O options and allows even interrupt based I/O using a shared INT line (again important, since the 08M can formally deal only with one asynchronous interrupt). Furthermore, several chips of this type can use the same chip select line, because they optionally implement address decoding a la i2C in their SPI protocol (using three pins for external addressing, thus differentiating bewteen identical chips). This implies that you could theoretically have 8 * 16 = 128 I/O lines with interrupt capability for a single 08M. Note that this use of addressing is an extension to SPI, generally not available on other SPI devices.

You could use the i2c versions (MCP23017, MCP23008) as well, but bitbanging SPI is much simpler than bitbanging i2c, and the 08M is memory constrained ... I do remember that someone on this forum has done this for a 08M, a few years ago ...

/Jurjen
 
Last edited:

manuka

Senior Member
I've long used snap off header pins for numerous breadboard applications, These solder easily (gold plated),are dirt cheap & particularly well suited for a DIY programming plug. See below from 2002-


That SR chip is a logic standard & I'm surprised your supplier thinks otherwise! FWIW "74HCxxx" has pretty much obliterated regular 4xxx CMOS, & for battery work (2-6V supply), & if blinding speed not crucial, "HC" blows older LS out of the water.

But more I/Os you say? What about a 14M or the recent 20M? These are only a $ or so more than the 08M, & immensely simplify wiring, the need for extra chips & even coding. An output alternative is Charlieplexing by the way, with up to 12 LEDs being controllable by just an 08M.
 
Last edited:

moxhamj

New Member
The HC595 is available from lots of places including ebay. However, I would agree with manuka that it makes more sense to use a 14M or 20M. The cost will be about the same, but the big advantage is that driving an HC595 uses up quite a few lines of code and then there is less code space for the rest of the program.

I'll often start a project with no idea which picaxe I'll use, start with an 08M, run out of pins, go to a 14M then a 20M (or if I run out of code space, to an 18X). Sometimes I start with an 18X and end up fitting it into an 08M.

It helps a lot to have some parts drawers with at least 2 of the above picaxes available so you can quickly change chips over as a project develops.
 

hippy

Ex-Staff (retired)
I'm with Manuka - For expanding the 08, 08M, 14M and 20M's I cannot think of much simpler to use than a 14M or 20M ...

- Do : SerIn RX_PIN, BAUD_RATE, pins : Loop

With a simple SEROUT or SERTXD to control it.

Maybe not the cheapest solution, not necessarily the fastest but could be just as fast as bit-banged SPI or I2C and certainly uses a lot less code. Easy to extend to as many output expanders as you want with no complex hardware ( just the same single line needed plus power), and can also be extended to read analogue and digital inputs as well.
 

westaust55

Moderator
SHift Registers - 74HC595 and alternatives

The 74HC164 is another alternative that can be pressed into service.
However, compared to other shift registers for parallel output, the 74HC595 has the following advantages;
1. It can be cascaded and has a specific pin to use for cascade of the data to further shift registers. This signal is taken from the 8th internal flip-flop rather than the latched output. The 74HC164 does not have this extra signal for cascading
2. The outputs hold their previous value until the new data is transferred to the outputs using the “Latch” command signal. This prevents seeing data rippling through on LED’s or other devices as 8 (or more) bits of data are shifted in one bit at a time. The 74HC164 does not have this latching facility.

The 4017 is a decade counter and not the right device to use as a shift register.

Other options to look at:
1. though not as good as the 74HC595 are the 4017 (a dual 4 bit shift register) and more akin to the 74HC164
2. the 4094 which is an 8bit shift register with 3-state and latching outputs- more akin to the 74HC595 and would be the next option I would think of using.
 

marcos.placona

Senior Member
Hi guys, thank you very much for all the answers. I ended up moving to a 18x, as I don't actually have any 14M or 20M.

Everything went straight forward, and I do share Dr_Acula's methodology about not having a clue about which picaxe I'll be using till I need more pins :D.

Normally I'd also start with the 08M, as I always have it breadboarded for small projects, so I'll just be using it's pins, and moving to the right solution when needed.

I also agree with Stan regarding the use of expanders, as it'll use some lines of code for itself, and will limit the number of bytes I can use for the actuall program.

In regards to the header pins, I've actually found some of them in my "toolbox", but they don't really do what I need, as you can't simply connect the wires into it, but have to solder/glue 'em to the pins.

I even thought about using real connectors like:



But then I'd need to screw/unscrew it every time, and it wouldn't be so simple.

Now looking at the rev-ed's shop, I could find this pcb plug.



And had the idea of simply getting those plus some "pcb to cable" contacts. Something like this:



I'll see with my supplier if they stock this kind of thing, but I believe it should be pretty common.

Everything was easier to get when I was living in the UK, but now that I moved to Belgium, it's a nightmare to get anything that is not really as "normal" as capacitors, resistors and some IC's.

Thanks for the help guys, and I look forward to see some answers/ideas about the "PCB Pins" to "PCB to cable".

Cheers
 

Dippy

Moderator
You've got a farnell in Belgium haven't you? I'm sure they take Credit Card orders. They've got zillions of connectors - inlcuding the ones you asked about originally.
Crimp,solder,plug,screw,
How you do it is up to you. (Poetry).
 

westaust55

Moderator
Latches and Shift Registers

The 74LS259 is a different form of 8-bit latch. It has 4 nominal modes of operation (one being to clear all outputs simultaneously).

To use the features it uses/requires:
1 x Data input pin,
3 x Latch selection/address pins (to select 1 of 8 latches)
1 x Enable pin and
1 x Clear pin. (This pin does enable the rapid clearing of all 8 bits of data.

Functionally it is not the same as the 74HC595 shift registers and requires 6 I/O pins to fully control the 8 outputs. As the data is not shifted serially into the 8-bit latch structure it is not possible to cascade them.
As a form of 1 of 8 decoder to select a single bit and change plus latch it’s state, if is a very worthwhile device. I fell however it would requires far too many I/O resources and lines of code to achieve the same as a single 74HC595.

The type of pins/plugs that are mentioned from Rev-Ed are the same as I am using with matching plugs (from Jaycar and Altronics here in Australia) for much of my inter-module loomed wiring (using ribon cable). I have also used the solder to PBC with screw down for power and singular signals back to my PICAXE AXE-22 proto-board
 

manuka

Senior Member
Those Rev. Ed "PC Plugs" are identical to the header pins I mentioned. As they use the normal 1/10th inch (2.54mm) pin pitch, a simple poor man's connector for them can be made by just hacking/trimming one side of a cheap DIP IC socket to suit.

 

hippy

Ex-Staff (retired)
On choosing connectors; it really depends on what you are connecting.

The long legged wire-wrap sockets are great for fitting to boards with enough to also fit into breadboard ( some legs may be a little large for that ) or other DIL sockets, and there are female Molex connectors which are good for mezanine use where one board stacks on top of another.

IDC ribbon cable is great for taking a number of lines from one place to another. Some shift registers and latches have I/O consecutive which makes them ideal for 'bus systems", others have their I/O all over the place which means more wiring.

For general purpose connections, single line IDC connectors are good for a single connection point and individual wires to various places.

Not sure if it's still available, but it used to be possible to buy IDC ribbon cable which had a 'DIL chip' header at each end which simply plugs into a standard IC socket.


For development boards I like 0.2" screw terminals. Quick and easy to wire up to no matter what's in the parts drawer.
 
Last edited:
Top