Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

continuity tester

Status
Not open for further replies.
wow !!!!
great thinking john ...
really beautiful .. that would be the solution i would prefer if i need a similar one
coooool .. it really takes a lot of presence-of-mind to think off the track and provide a simple solution to a problem where others rack their brains ..
i couldn't think of not using the mcu as display was mentioned to be the most important ..
and a matrix led display was something off the track ..
wonderful answer .. i love that ..
 
One assumes, if a tester is being designed and built, then it is for large quantities, otherwise a multimeter and a person would suffice. In large quantities however; one wants to automate the process. Looking for LED's, or light bulbs to light requires a person to see the indicators and watch them. What if the operator misses a 1 of 100 light bulbs that did not light. This sort of process should be automated and produce a paper report. Else, just grab a meter.
 
it can be a matrix of smt led's .. maybe on a small pcb of size 3cm x 3cm
and the wires could short the led's so only the led connected to the defective wire glows ..
maybe it would be easy to spot a single glowing led from 100 unlit ones - in a small viewing area
 
it can be a matrix of smt led's .. maybe on a small pcb of size 3cm x 3cm
and the wires could short the led's so only the led connected to the defective wire glows ..
maybe it would be easy to spot a single glowing led from 100 unlit ones - in a small viewing area

I don't want to pay someone to watch leds glow. I rather let a computer do the job and give a print out. My employees have more important things to do. I guess it depends on how you would run a business. Remember the old adage, Time is money, and that is the bottom line...
 
yes - of course . i agree with that one too ..
and it all depends on available resources ..
with a computer at hand .. the process becomes much more Professional .. error proof ..
and can have printed reports with date time stamps .. or even the resistances (or conductivity) of the different wires
not just continuity but also shorting between adjacent wires .. and too much more ... :))
 
hi John,

I dunno, the more i read this thread, the more it looks like another introduction to MCUs.

If you read ALL the posts it suggests that the OP was considering an MCU solution, he has posted a circuit dwg and a program.??

He also says:
and the result to be display on a lcd?
Which indicates some form of wire numbering display.

Why he want to use an MCU for such a simple task of checking the continuity of a 100 wire loom, I dont know, I wouldn't.

As often, I suspect that there is a more detailed requirement behind this project.:)
 
Last edited:
You mean like this...

**broken link removed**
 
hello if i cant use the LS138.. cant i use the 74HCT238D which is active high output..? will there be problems too..
 
Active high outputs would put less current drain on IC, so I guess this would be better. Lots of resistors though.

Can you explain why you are using 100 pin cable? Have you thought of the problems involved with making 100 pin cable? This sort of cable is difficult to make.
 
Last edited:
Active high outputs would put less current drain on IC, so I guess this would be better. Lots of resistors though.

Can you explain why you are using 100 pin cable? Have you thought of the problems involved with making 100 pin cable? This sort of cable is difficult to make.

i understand the problems involve.. it will be very complicated.. actually the more i think of it.. the more complicated i think it is.. and the circuit wiring will be.. well.. what can i say..

i also know that this can be solve easily by using LEDs to show the results.. but i still wish that i can display the results on LCD..
 
Have you considered making 4 smaller cables with same pin out? Cost of connectors will be higher but problems will be fewer so cost may balance out.

On second thought, one 100 pin connector may cost more than four 25 pin connectors.

Plus, you would have many tooling cost associated with 100 pin cable.
 
Last edited:
sorry if i dont understand you well.. but im not making the cable.. im building a tester to test the cables..
 
yes the lcd display routines take up most of the program ..
to me it seems that it would not be necessary to display the pass/fail for each wire ..
maybe scan through all the 100 wires and then just say if all are ok .. or the list of wires which are not (remember to leave some delay for the user to read the result

i understand what you mean.. i also want to do it this way.. but i have no idea how i can 'saved' the failed results first then display the results at the end of the scanning.. if that is what you mean.. can give example..?
 
sorry if i dont understand you well.. but im not making the cable.. im building a tester to test the cables..

Okay, I see your stuck with the bad choice of a 100 pin cable. Testing for shorts between pins will be something to consider as well as continuity.
 
nite,
If you use the simple method proposed by 'john1', you dont need any memory.

As suggested use each wire to sink/source the current thru a resistor/led.

The leds that dont light, indicate a o/c wire.
 
i understand what you mean.. i also want to do it this way.. but i have no idea how i can 'saved' the failed results first then display the results at the end of the scanning.. if that is what you mean.. can give example..?

yes - so it seems that u MUST use an LCD ..
the programmed written by u seems fine .. except that the user cant wait till 100 iterations to see if all wires are ok

you have plenty of free RAM space .. you can save the scan results in the RAM and at th end of scan display the results
You only need to save if a particular wire fails
If the fail list is NULL (or 00 .. or empty ) all wires passed test .. accordingly display the result
 
yes - so it seems that u MUST use an LCD ..
the programmed written by u seems fine .. except that the user cant wait till 100 iterations to see if all wires are ok

you have plenty of free RAM space .. you can save the scan results in the RAM and at th end of scan display the results
You only need to save if a particular wire fails
If the fail list is NULL (or 00 .. or empty ) all wires passed test .. accordingly display the result

sorry guys.. just want to ask.. how can i increment the address no. so that i could stored the no. of the failed wires one by one..

i had declared a starting address to store the no. but from the syntex i cant find anyway that i can increment the address so that i could move to the next address.. thanks
 
sorry guys.. just want to ask.. how can i increment the address no. so that i could stored the no. of the failed wires one by one..

i had declared a starting address to store the no. but from the syntex i cant find anyway that i can increment the address so that i could move to the next address.. thanks

hi.. i found the way to store the value by using the pointer method using FSR and INDF.. this is my program up to now

Code:
	LIST	p=16F628		;tell assembler what chip we are using
	include "P16F628.inc"	;include the defaults for the chip
	ERRORLEVEL	0,	-302	;suppress bank selection messages
	__config 0x3D18			;sets the configuration settings (oscillator type etc.)




		cblock	0x20		;start of general purpose registers
			count			;used in looping routines
			count1			;used in delay routine
			counta			;used in delay routine
			countb			;used in delay routine
			tmp1			;temporary storage
			tmp2
			templcd			;temp store for 4 bit mode
			templcd2
			temp01			;use in identifying wire no.
			pointer			;use to point the next address
	
		endc

LCD_PORT	Equ	PORTA
LCD_TRIS	Equ	TRISA
LCD_RS		Equ	0x04			;LCD handshake lines
LCD_RW		Equ	0x06
LCD_E		Equ	0x07

		org	0x0000
		goto	Start

Main_Text	addwf	PCL, f
		retlw	'I'
		retlw	'N'
		retlw	'I'
		retlw	'T'
		retlw	'I'
		retlw	'A'
		retlw	'L'
		retlw	'I'
		retlw	'S'
		retlw	'I'
		retlw	'N'
		retlw	'G'
		retlw	0x00

Text_Fail	addwf	PCL, f
		retlw	' '
		retlw	'F'
		retlw	'A'
		retlw	'I'
		retlw	'L'
		retlw	0x00

Text_Pass	addwf PCL, f
		retlw	'A'
		retlw	'L'
		retlw	'L'
		retlw	' '
		retlw	'P'
		retlw	'A'
		retlw	'S'
		retlw	'S'
		retlw	0x00

Text_space	addwf PCL, f
		retlw	' '
		retlw	0x00

Start		movlw	0x07
			movwf	CMCON			;turn comparators off (make it like a 16F84)

Initialise	clrf	count
			clrf	PORTA
			clrf	PORTB
			clrf	temp01
			movlw	0x30
			movwf	pointer

SetPorts	bsf 	STATUS,		RP0	;select bank 1
			movlw	0x00			;PORT A for LCD
			movwf	LCD_TRIS
			movlw	0x80			;PORT B for Decoder
			movwf	TRISB
			bcf 	STATUS,		RP0	;select bank 0

			call	LCD_Init		;setup LCD
			call 	LCD_Line1
			clrf	count			;set counter register to zero
Main		movf	count, w		;put counter value in W
			call	Main_Text		;get a character from the text table
			xorlw	0x00			;is it a zero?
			btfsc	STATUS, Z
			goto	Sub_Main
			call	LCD_Char		;Display Initialising
			nop
			incf	count, f
			goto	Main

Sub_Main	movlw	b'01000000'
			movwf	PORTB
			Call	Repeat	
			movlw	b'01001000'
			movwf	PORTB
			Call	Repeat
			movlw	b'01010000'
			movwf	PORTB
			Call	Repeat
			movlw	b'01011000'
			movwf	PORTB
			Call	Repeat
			movlw	b'01100000'
			movwf	PORTB
			Call	Repeat
			movlw	b'01101000'
			movwf	PORTB
			Call	Repeat
			movlw	b'01110000'
			movwf	PORTB
			Call	Repeat
			movlw	b'01111000'
			movwf	PORTB
			Call	Repeat
			movlw	b'00000000'
			movwf	PORTB
			Call	Repeat
			movlw	b'00001000'
			movwf	PORTB
			Call	Repeat
			movlw	b'00010000'
			movwf	PORTB
			Call	Repeat
			movlw	b'00011000'
			movwf	PORTB
			Call	Repeat
			movlw	b'00100000'
			movwf	PORTB
			Call	Repeat
			movlw	b'00101000'
			movwf	PORTB
			Call	Repeat
			movlw	b'00110000'
			movwf	PORTB
			Call	Repeat
			movlw	b'00111000'
			movwf	PORTB
			Call	Repeat
			Goto	Display
			Return

Repeat		Call	Check
			bsf		PORTB, 0
			Call	Check
			bcf		PORTB, 0
			bsf		PORTB, 1
			Call	Check
			bsf		PORTB, 0
			Call	Check
			bcf		PORTB, 0
			bcf		PORTB, 1
			bsf		PORTB, 2
			Call	Check
			bsf		PORTB, 0
			Call	Check
			bcf		PORTB, 0
			bsf		PORTB, 1
			Call	Check
			bsf		PORTB, 0
			Call	Check
			Return

Check		Incf	temp01, f		;indicate which wire is testing
			Call	Delay255
			Call	Delay255
			btfss	PORTB, 7		;check input for '1', skip if '1'
			Call	Fail_Test
			Return

Fail_Test	movfw	pointer
			movwf	FSR
			movfw	temp01
			movwf	INDF
			Incf	pointer,f		;next address
			Return
				
Display		movfw	pointer			;put value in W
			xorlw	0x30			;is it a zero?
			btfsc	STATUS, Z
			Call	Display_Pass	;pointer stay at 0x30 meaning nothing fail
			Call	Display_Fail	;if not, display which wire fail
			Return

Display_Pass
			Call	LCD_Clr
			Call	LCD_Line1
			clrf	count			;set counter register to zero
All_pass	movf	count, w		;put counter value in W
			call	Text_Pass		;get a character from the text table
			xorlw	0x00			;is it a zero?
			btfsc	STATUS, Z
			goto	Final_Delay
			call	LCD_Char		;Display All pass
			nop
			incf	count, f
			goto	All_pass

Display_Fail
			Call	LCD_Clr
			Call	LCD_Line1		;display on first line
Wire_Fail02	Decf	pointer,f
			movfw	pointer
			movwf	FSR
			movfw	INDF
			call	LCD_CharD		;convert to ASCII
			goto	Fail_Check

Spacing		movf	count, w
			Call	Text_space		;Spacing
			xorlw	0x00
			btfsc	STATUS, Z
			goto	Wire_Fail02			
			call	LCD_Char		;display spacing
			nop
			incf	count, f
			goto	Spacing

Fail_Check 	clrf	count
			movfw	pointer
			xorlw	0x30
			btfsc	STATUS, Z
			goto	Spacing
Fail_Print	movf	count, w
			Call	Text_Fail		;Fail
			xorlw	0x00
			btfsc	STATUS, Z
			goto	Final_Delay			
			call	LCD_Char		;display Fail
			nop
			incf	count, f
			goto	Fail_Print

Final_Delay	Call	Delay255	
			Call	Final_Delay

;Subroutines and text tables

;LCD routines

;Initialise LCD
LCD_Init	call	Delay100		;wait for LCD to settle

		movlw	0x20			;Set 4 bit mode
		call	LCD_Cmd

		movlw	0x28			;Set display shift
		call	LCD_Cmd

		movlw	0x06			;Set display character mode
		call	LCD_Cmd

		movlw	0x0c			;Set display on/off and cursor command
		call	LCD_Cmd			;Set cursor off

		call	LCD_Clr			;clear display

		retlw	0x00

; command set routine
LCD_Cmd		movwf	templcd
		swapf	templcd,	w	;send upper nibble
		andlw	0x0f			;clear upper 4 bits of W
		movwf	LCD_PORT
		bcf		LCD_PORT, LCD_RS	;RS line to 0
		call	Pulse_e			;Pulse the E line high

		movf	templcd,	w	;send lower nibble
		andlw	0x0f			;clear upper 4 bits of W
		movwf	LCD_PORT
		bcf		LCD_PORT, LCD_RS	;RS line to 0
		call	Pulse_e			;Pulse the E line high
		call 	Delay5
		retlw	0x00

LCD_CharD	addlw	0x30			;add 0x30 to convert to ASCII
LCD_Char	movwf	templcd
		swapf	templcd,	w	;send upper nibble
		andlw	0x0f			;clear upper 4 bits of W
		movwf	LCD_PORT
		bsf		LCD_PORT, LCD_RS	;RS line to 1
		call	Pulse_e			;Pulse the E line high

		movf	templcd,	w	;send lower nibble
		andlw	0x0f			;clear upper 4 bits of W
		movwf	LCD_PORT
		bsf		LCD_PORT, LCD_RS	;RS line to 1
		call	Pulse_e			;Pulse the E line high
		call 	Delay5
		retlw	0x00

LCD_Line1	movlw	0x80			;move to 1st row, first column
		call	LCD_Cmd
		retlw	0x00

LCD_Line2	movlw	0xc0			;move to 2nd row, first column
		call	LCD_Cmd
		retlw	0x00

LCD_Line1W	addlw	0x80			;move to 1st row, column W
		call	LCD_Cmd
		retlw	0x00

LCD_Line2W	addlw	0xc0			;move to 2nd row, column W
		call	LCD_Cmd
		retlw	0x00

LCD_CurOn	movlw	0x0d			;Set display on/off and cursor command
		call	LCD_Cmd
		retlw	0x00

LCD_CurOff	movlw	0x0c			;Set display on/off and cursor command
		call	LCD_Cmd
		retlw	0x00

LCD_Clr		movlw	0x01			;Clear display
		call	LCD_Cmd
		retlw	0x00

Delay255	movlw	0xff		;delay 255 mS
		goto	d0
Delay100	movlw	d'100'		;delay 100mS
		goto	d0
Delay50		movlw	d'50'		;delay 50mS
		goto	d0
Delay20		movlw	d'20'		;delay 20mS
		goto	d0
Delay5		movlw	0x05		;delay 5.000 ms (4 MHz clock)
d0		movwf	count1
d1		movlw	0xC7			;delay 1mS
		movwf	counta
		movlw	0x01
		movwf	countb
Delay_0
		decfsz	counta, f
		goto	$+2
		decfsz	countb, f
		goto	Delay_0

		decfsz	count1	,f
		goto	d1
		retlw	0x00

Pulse_e		bsf	LCD_PORT, LCD_E
		nop
		bcf	LCD_PORT, LCD_E
		retlw	0x00

;end of LCD routines
		end
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top