Joe's Hobby Electronics
  • Joe's Hobby Electronics
    • Electronics Blog

Same old excuses

30/3/2022

0 Comments

 
What can I say... I'm a busy chap.

I've been so busy with work and a large personal project that I've not really had much time for "fun" things, that said, it's funny how one thing leads to another.

I've been working on an all consuming huge project and I needed to take a break. I'm at a bit where I'm stuck and so decided to distract myself for a while and do something fun.
Many many years ago I had a project; the Digital IC Tester, published by Everyday Practical Electronics a UK electronics magazine. It consisted of a PCB with a PIC micro, some jellybean components and a serial connection to a PC that ran some; though I say so myself, brilliantly designed and written software. The setup was capable of testing TTL and CMOS digital ICs and the user could add their own IC definitions to the database. It wasn't meant to test all the operational parameters of an IC, just give a go/no go indication of it's operation. The project was a huge success apparently and even now I get e-mails about it. The software has been ported from Windows to other platforms and people have reinvented the design to suit their own requirements... it's been rather good :)
The reason I'm bleating on about this piece of history is that over the years I've had to fend off one question repeatedly "will it test ICs in-circuit". 
The simple answer is "no".. it won't. The more complex answer is still "no". 

If you imagine an IC as part of a larger circuit, the IC inputs are connected to other components in the circuit that are attempting to drive those inputs. You cannot just attach a test clip and start trying to force pins to logic levels when those pins are attached to other components in the circuit that are themselves trying to drive the same pins.
Attempting this would probably either damage these components in the circuit, or the tester device.

However, some while ago I had a thought.

Imagine a circuit; as complex as you like, that contains a suspect IC; and for sake of explanation and simplicity we will pick the humble 74LS00 - Quad 2-input NAND. 
Picture
The IC contains four NAND gates, where each gate contains two input pins and one output pin. With two inputs there are four possible logic output combinations. Details of the logic combinations and related output logic levels are listed in the truth table or function table for the gate. 

The common way to test the IC is to manipulate the logic levels on the input pins, monitor the output logic level and compare the results with the published truth table. If the output logic levels deviate from the truth table, it's fair to assume the IC is faulty. 

It occurred to me that I don't have to drive the inputs, the circuit will do that. All I need to do is capture the logic levels on the inputs and outputs and compare them with the truth table.

There is a flaw in this plan... actually it turns out there are two flaws but I didn't see the second until after I tried... But more on that exciting revelation in a minute. 

As already stated, out NAND gate has two inputs which gives a total of four possible input logic level combinations. But what if the circuit never uses all four combinations ? 
If I capture the input and output logic levels and compare them with the truth table, I can state that I know how many input combinations are possible (four for our NAND gate), that I've only detected some of them, (for example lets assume only three of the combinations have been used), and of those three combinations detected they all gave the correct logical output. So I'm 75% confidant the NAND gate is working correctly. If however I detect an invalid logic output for an input combination, I can be 100% confidant that the NAND gate is faulty. 
It's brilliant. 

Actually... it's almost brilliant. 

I rushed to my breadboard and constructed a simple test circuit. 
I would use a parallel load shift register to take a snapshot of the logic levels on all the IC pins, and then compare that data to the truth table from the data sheet. 
Picture
The above picture shows my prototype.

A 16-bit shift register with parallel load inputs is connected via a ribbon cable to an IC under test; the IC was in fact a 74LS00 running on my perfectly working 6502 CPU card. 
The data is read from the shift register by a PIC micro and the data squirted down a serial connection to my PC that was running a bit of VB code to display the results. This was going to be great. 

It worked, data was being captured in real-time and I could see the logic combinations being displayed on screen. 

Then I noticed something strange..
I was getting more combinations detected than were possible for a NAND gate.
I would see both inputs at logic 0 but the output also logic 0, or both inputs at logic 1, and the output also at logic 1. This wasn't possible unless there was a fault somewhere, and I knew that the IC was fine as was the CPU card being tested.

Time to break out the logic analyser. 
Ok, on reflection I should have done this first, it would have saved a lot of trouble later on. But it was on the top shelf under a pile of junk and a P.I.T.A to get too. 

After a couple of minutes the problem became obvious.
Picture
The three traces represent pins 1, 2 & 3 (1,2 are inputs and 3 is the output) of a 2-input NAND gate.
The trace shows that pin 2 (middle trace) is at logic 1 constantly, and then shows pin 1 moving from logic 0 to logic 1. However, you can see there is a delay before the gate output (lower trace) moves from logic 1 to logic 0.
This delay is the gate propagation delay, and if, unlike me, you take the time to actually read the datasheet for the humble 74LS00 in detail, you will see it states the propagation delay as a maximum of 15ns (it's around 10ns on the logic trace so that's within specification). 
Picture
So, what next.. is the great invention dead. 

Well I think that using my hardware project to capture the data is not going to work. Whilst I originally didn't need to capture every logic change it's really not going to be fast enough. 
I did try a different hardware setup that used 74LS573 8-bit latches to capture the data but it still takes too long to read the data, store it in the PIC and then transmit back to the PC. Even buffering a batch of results in the PIC first wasn't fast enough. 

Then I thought, but my logic analyser "is" fast enough... and it has a very nice data export function. I could capture the data and export it for processing by my own software.
If I watch for logic changes on the pins designated as outputs, and then backtrack in time I should be able to find the value of the input pins.  It might work.

Next problem which I never thought was going to be a problem... I need a 20 and/or 16 pin IC test clip.
Have you seen the price of IC test clips in the UK... they are absolutely ridiculous. 
I've a 14 and a 40 pin one that I've had for years, so I went shopping for a 16 and 20 pin versions.
After seeing the price I started wondering if I could make my own.
Question, can my 3D printer, print the case for a test-clip that is fine enough, but strong enough to make a decent test clip?

​So I designed on in TinkerCad...
Picture
And yes... it can give the resolution required and is perfectly strong enough.

The above model has ten hollow channels that run from the pin contacts all the way to the top and will allow for a fine connecting wire. I just need to figure out what I can use to make the contact.
After this, print two identical copies, fit a torsion spring and a bolt and it should be done. 

If anybody out there reading this is into hobby electronics I cannot recommend strongly enough that you have a look at 3D printing if you've not already. They are quite affordable these days and as long as you aren't overly bothered about keeping lots of different colours of filament in stock (I only print on whatever colour I last purchased as cheaply as I could find it), it's not very expensive to use.
Considering that one supplier wanted over £100 for a 20 pin test clip... printing your own small parts and tools can be a real cost saving.
​
0 Comments

Shift registers

13/9/2013

0 Comments

 
I've been a bit lax recently and whilst I've got piles of content that I need to complete and upload, pressures of starting a new job are taking their toll. I'm hoping that normal service will be resumed soon.

Anyway, I've uploaded an article (PDF document) that attempts to give the reader a brief introduction to shift registers. Theory is all well and good so there are some simple construction details for a PIC based project that can control up to 255 x seven-segment displays. All the source code and diagrams etc are supplied so the constructor can change the firmware to fit their own requirements.

UPDATE 20th Sept, 2013.... Just uploaded the correct version of the PDF file... sorry about that.
0 Comments

PICs, Shift Registers and lots and lots of display digits

17/4/2013

1 Comment

 
Picture
I’ve been experimenting with using a PIC to control long chains of 7-segment LED displays, and to find an approach that I can use to replace the obsolete TIL311 displays. To that end, I’ve created a tech article that describes a simple way to do this. My prototype was 24 digits long; long enough for most applications I think, but could be extended. It’s all done with a PIC18F25K22 running from its own internal oscillator, accepts data from a serial device at 9600 baud, and supports 0 to 9, and A to F value display. The code is written in AMICUS18 BASIC which is free so you can change the software to suit your own application. All the fully documented source code is supplied as well as a schematic of the circuit.

The picure above shows 24 digits (6 x 4 digit modules). The display modules each contain a 4 x 7 segment Common Cathode display, a DIL resisor pack on the modules right-hand side, and there are 4 n-channel SMT MOSFETS underneath.
The advantage of using modules on breadboards is the vast amount of time, and wire that's saved. You can throw a quick circuit together in no-time if you already have the modules pre-built. It also saves a lot of breadboard space.

1 Comment

Completed... at last...

1/1/2012

0 Comments

 
At last, it’s completed and this new programmer will make my life so much easier when it comes to PIC development.

This has been one of those projects that in some ways, I wished I’d not started as there seemed no end to it and everything just seemed to go wrong. I blame the fact that I never really had any time to just sit down and do this project from start to finish, but now it’s completed and working, I’m really pleased I stuck with it.

And here it is.
Picture
Ok, a bit of explanation as to what this lovely, beautiful piece of equipment can do.

Inside the case are six PCBs packed with electronics. There’s a PCB that contains a PSU with 5v regulator and an adjustable voltage regulator; set to around 7.3v that drives the LEDs in the push switches. Also on this board is a MAX232 and associated electronics that provide two RS232 interfaces; more on these in a second. There are four almost identical boards; one per output channel that contain a 16-bit shift register, driver chips and relays. The final board contains the PIC and driver logic that runs everything.

Also inside are two Microchip PICKIT programmers (a PICKIT2 and a PICKIT3).

On the front panel there are four 9-way D-Type connections that can be used to connect an ICSP cable to a project under development, or, in the case of this new programmer, up to four projects in development; this will make multi-PIC projects a lot simpler to develop and debug.

You can select which PICKIT is connected to which of the four ports and you can of course only connect each programmer to one port at a time. The unit also has in-built support for RS232 which I use for project debugging. My custom ICSP cable has provision for serial data to be set from the PIC to the outside world and this makes it possible to send any debugging information from the PIC, into my programmer which level shifts from TTL to RS232 and then out to a dumb terminal emulator. I’ve made provision for up to two serial ports and again, you can select which serial port is attached to which input. The serial ports are also available via four, 4mm banana sockets on the front panel for use within other projects.

The upshot of this is that you can connect one port to each PIC project under development, and allocate either of the internal programmers / serial ports on the fly to each port as required without the need to keep unplugging cables all the time.

The advantage of this new unit over my now obsolescent one (which only support up to three outputs and was very clunky), is that I could, in theory, expend the design to support as many output ports as required. It would be a lot of additional effort to increase the number of PICKIT programmers that can be supported. This was going to be a six port unit but I didn’t have a case large enough at the time. But now I’ve got all the hardware sorted out, it wouldn’t be too difficult to build a larger one if required. I’d need to tweak the PIC firmware that controls everything of course, but that’s no real hassle.

Oh yes, the reason I've used a PICKIT2 and a PICKIT3 is simple. I prefer the PICKIT2 as it's much faster than the 3, but the 3 supportes a couple of PICs that I've started to use that the 2 dosn't. I could have used any combination of programmers if desired, or even completly different programmers. It's just I rather like the Microchip ones.
0 Comments

Long bit length shift register chains

25/12/2011

0 Comments

 
I made a promise to myself to finish my PIC programmer over the holidays. This project, like a many of my projects contain a shift register chain, and this one is 64 bits long which isn’t really a lot, but the firmware controlling the project is quite complex and I’ve been having problems debugging everything. One thing that would be really useful is an external display that I could connect to a project and could give me a visual indication of the state of the shift register chain outpus in the project under construction.

So, I took another slight diversion and built a piece of test equipment that can help.

The analyser can connect to the set of control signals that control a shift register chain within a project, and display on several bar-LED displays, the status of the shift register chain being monitored.

The unit has two inputs so it can monitor two shift register chains in parallel, each of up to 56 bits, or by flicking a switch, combine the two displays together to monitor a single chain of up to 112 bits in length. The project is extendable and could be expanded to monitor shift register chains of any number of bits if required.

The unit is a bit of a compromise as I had to use parts and a case I had available, but it does employ fully buffered inputs so presents minimal external load to the project it’s being used to monitor, and has it’s own internal voltage regulator board which will accept a 9v AC/DC input. With all the LED's on, the unit draws just under an amp !!

At some point over the next few days, I’ll create a basic construction article and include the PCB foils and circuit diagrams etc.
Picture
0 Comments

    Author

    A software and hardware engineer who loves retro computers.

    Archives

    March 2022
    September 2021
    April 2021
    June 2020
    May 2020
    April 2020
    March 2020
    September 2019
    January 2019
    April 2018
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    May 2015
    April 2015
    March 2015
    January 2015
    December 2014
    September 2014
    August 2014
    April 2014
    March 2014
    January 2014
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    April 2013
    March 2013
    January 2013
    September 2012
    June 2012
    May 2012
    April 2012
    February 2012
    January 2012
    December 2011
    November 2011
    October 2011
    September 2011
    August 2011
    July 2011
    June 2011

    Categories

    All
    18f25k20
    18F25K22
    1-wire
    2114
    2764
    3D Printer
    3D Printing
    74hc595
    74ls595
    86-0325
    8MHz
    Access Speed
    Acorn
    Acorn System 1
    Alarm
    Aluminium Panel
    Amicus
    Amicus18
    Amicus Basic
    Amplifier
    Antex 1107
    Anti-static Mat
    Arduino
    Assembler
    Backlight
    Bargains
    Basic
    Bat
    Batdetector
    Bat Detector
    Bats
    Bench Audio Amplifier
    Bench Light
    Breadboard
    Bubbler
    Buck
    Bug
    "C"
    Cable
    Cable Gauge
    Cable Wire Size
    Capacitors
    Catalogue
    Clive Maxfield
    Clock
    Clocks
    CMOS
    Common Emitter
    Compiled
    Compiler
    Connector
    CPU
    CPU Simulator
    Crownhill
    Custom Computer
    Custom CPU
    Damage
    Develop
    Diode
    Diptrace
    Double-sided
    Double-Sided PCB
    Dry-joint
    Ds1302
    DS1820
    Ds18b20
    Ebay
    EEPROM
    Electronics And Circuits
    Eprom
    Erase
    Etch
    Evaporator
    Failed Capacitor
    Fake
    Fax Paper
    Ferric Chloride
    Fire Hazzard
    Firmware
    Florescent Tube
    Health And Safety
    Hidden Part Numbers
    High-Voltage
    Hv
    IC Test Clip
    IC Testing
    In Circuit IC Testing
    Incubator
    INS8154
    Instruction Set
    Inverter
    Kickstarter
    Laser Cutter
    Lcd
    LM2596
    LM386
    Logic Analyser
    M7MOJ
    Maxim
    Maximum Current Rating
    Mega
    Mit
    MITx 6.002
    MK4
    Molex
    Mosfet
    NE555
    Nixie
    Nixie Clock
    Npn
    OXO
    Oxo Machine
    Pcb
    Pic
    Pic Basic
    Pickit2
    Pickit3
    Pic Programmer
    Pixy
    Poster
    Pre-amp
    Prices
    Programming
    Project Box
    Project Case
    Project Enclosure
    Propagation Delay
    Psu
    Psu Failure
    Qfn
    RAM
    Rapid Electronics
    Raspberry Pi
    Regulated 5v Psu
    Regulator
    Repair
    Review
    SAD (Segment Address Decoder)
    SCC
    SCC MK4
    Seven Segment Display
    Shift Register
    Silient 700
    Slow Progress
    Smoke
    Smps
    Soldering
    Speed
    Speed Test
    Stepper Motor
    Supression
    Swg
    Switch Box
    Tank
    Tantalum Capacitor
    Temperature
    Temperature Sensor
    Texas Instruments
    Thermometer
    Tic Tac Toe
    Tic-tac-toe
    Timer
    Tools
    Traffic Lights
    Transistor
    TTL
    Usb
    Uv
    Vbe
    Vcb
    Vce
    W65C02
    Wash
    Weller
    Wirecutters
    Wire Cutters
    Wire Strippers
    Wiring
    Wp3eu
    X2 Capacitor
    X Capacitor
    Y Capacitor

    RSS Feed

© Joe Farr, 2011 - 2022 - Email: HobbyElectronics@kcsl.uk.com