• 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.

Shifting problem !

Status
Not open for further replies.

MessUpMymind

New Member
hi there,

from my previous post http://www.electro-tech-online.com/threads/shifting-74ls164-is-not-working.93571/ i have solve the problem previous appeared and now i facing another problem ,

1)my data and shifting have gone well controlled but only when i shift 1 data and clear the shift register and send another data in it's visible.
OR
different data once in a row only , means data which show static but not shifting either to left or right.

what my objective is i wan to show a character out on the matrix that's shifting.

Code:
Start:	movlw	0xE0
		movwf	dat1
		
		movlw	0x50
		movwf	dat2
		
		movlw	0x58
		movwf	dat3

		movlw	0x50
		movwf	dat4

		movlw	0xE0
		movwf	dat5
		
		movlw	.5
		movwf	shift

Run1:	movlw	0x01
		xorwf	PORTB
		call 	DELAY
		
		movfw	dat1
		movwf	col1
		call	CLK
		call	Shift

		movfw	dat2
		movwf	col1
		call	CLK
		call	Shift
		call	DELAY
				
		movfw	dat3
		movwf	col1
		call	CLK
		call	Shift
		call	DELAY

		movfw	dat4
		movwf	col1
		call 	CLK
		call	Shift
		call	DELAY
	
		movfw	dat5
		movwf	col1
  		call 	CLK
		call 	Shift
		call	DELAY

		Goto	Run1
		
	
DELAY					; common delay for all condition
		MOVLW	d'50'	
		MOVWF	COUNT1
DELAY1	
		DECFSZ	COUNT2,1
		GOTO	DELAY1
		DECFSZ	COUNT1,1
		GOTO	DELAY1
		RETURN

Shift:	movfw	col4
		movwf	col5
		
		movfw	col3
		movwf	col4
		
		movfw	col2
		movwf	col3
		
		movfw	col1
		movwf	col2

		Return
CLK:	bsf	PORTC,1		;enable data pin
			
		movfw	col1
		GOTO	       Clock_Pulse
		movfw	PORTD
		movwf	col1
		
		bcf	PORTC,1		;disable data pin

		movfw	col2
		GOTO	       Clock_Pulse
		movfw	PORTD
		movwf	col2

		movfw	col3
		GOTO	Clock_Pulse
		movfw	PORTD
		movwf	col3
		
		movfw	col4
		GOTO	Clock_Pulse
		movfw	PORTD
		movwf	col4
	
		movfw	col5
		GOTO	Clock_Pulse
		movfw	PORTD
		movwf	col5
			
		RETURN
	
Clock_Pulse:
		movwf	Col_Data	;save column data temporary storage
		nop
		movfw	Col_Data
		movwf	PORTD
		nop
		nop
		return

lend me a hand please if you have experience this =)..:(
 

be80be

Well-Known Member
what my objective is i wan to show a character out on the matrix that's shifting.
Messupmymind Tell me some thing do you think you can Light up a letter at a time? like shift a A out
 

MessUpMymind

New Member
hi angry,

ops sorry there should be clock pulse sending in.

hi be80be,

yes i can do it , but it will stay static there..there for now i wan some thing like


00000 00000 00000 00000 00000
00000 00000 10000 01000 00100
00000 10000 01000 00100 10010
10000 01000 00100 00010 00001
10000 11000 11100 11110 11111
10000 01000 00100 00010 00001
00000 00000 00000 00000 00000

and until the A is finish shifting , then next character come in.
sorry that my scratch is a bit messy:p
 
Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading

 
Top