| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		
			Regular Guy
 
 
  Joined: 04 Jun 2017 Posts: 110
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				| Assembler 74HC165 Serial In,Parallel Out Shift Register | 
			 
			
				 Posted: Sun Jun 27, 2021 7:20 pm     | 
				     | 
			 
			
				
  | 
			 
			
				 	  | Quote: | 	 		  Shift registers are used to convert serial data to parallel or vice versa. "Talking" to shift registers
 
is a good way to get started learning about serial communication. Shift registers are useful as
 
parallel output and input ports which may be interfaced with a PIC16 serially.
 
For our first example, we will use a 74HCl64 which is a serial in, parallel out shift register. The
 
"in" vs. "out" designations are with respect to the shift register. The object is to create and send
 
8 bits of data to the shift register serially and look at its outputs via DVM, LED's or whatever to
 
see if the byte got there successfully. | 	  
 
 
We will post our Mini Board for this experiment.
 
 
It is on the way to us.
 
 
 
Will post code too.
 
 
This is from PIC'n Up The Pace
 
 
Like author says we think this is good place to start.
 
 
With all the kinds of serial communication.
 
 
Anybody familiar with this?
 
 
Thanks! _________________ PIC Hobbyist | 
			 
		  | 
	
	
		  | 
	
	
		
			temtronic
 
 
  Joined: 01 Jul 2010 Posts: 9589 Location: Greensville,Ontario 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Sun Jun 27, 2021 7:43 pm     | 
				     | 
			 
			
				
  | 
			 
			
				| yes, used 1000s of them before PICs..... | 
			 
		  | 
	
	
		  | 
	
	
		
			Regular Guy
 
 
  Joined: 04 Jun 2017 Posts: 110
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		 | 
	
	
		  | 
	
	
		
			Ttelmah
 
 
  Joined: 11 Mar 2010 Posts: 19967
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Jun 28, 2021 12:03 am     | 
				     | 
			 
			
				
  | 
			 
			
				SPI, is 'shift registers'.
 
 
The receive part of the  PIC SPI, is an 8bit shift register. The send part 
 
another. When you send a byte, it is parallel loaded to the shift register,
 
and then the hardware clocks this out as a serial stream, with the clock.
 
At the same time any data presented to the input pin is clocked with the
 
same clock into the other shift register.
 
The receive part is a serial in parallel out register, and the transmit
 
a parallel in serial out register. 
 
You can generate the output part of this in software. Receiving (except 
 
at lower clock rates), is harder. 
 
The only thing 'special' about SPI, is that unlike most hardware shift
 
registers, the ones used for this allow you to specify which clock edge
 
is used, both on the transmit one, and the receive one. 
 
 
So an 8bit shift register can be loaded with 'software SPI', or 'hardware
 
SPI'. | 
			 
		  | 
	
	
		  | 
	
	
		
			Regular Guy
 
 
  Joined: 04 Jun 2017 Posts: 110
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Jun 28, 2021 1:03 am     | 
				     | 
			 
			
				
  | 
			 
			
				Thank you Ttelmah
 
 
That is a 5 star answer!   
 
 
We feel that the board that has code send to it and lights LED's is for us.
 
 
Like it says in PIC'n Up The Pace.
 
 
The best starting point.
 
 
We feel that sending to another PIC is a 'moving target'.
 
 
You have the second code and hardware setup to debug.
 
 
Same thing with RS232 to terminal program.
 
 
You have the terminal program and settings to debug.
 
 
So.
 
 
Board with shift register and 8 LED's is for us.
 
 
Thanks! _________________ PIC Hobbyist | 
			 
		  | 
	
	
		  | 
	
	
		
			temtronic
 
 
  Joined: 01 Jul 2010 Posts: 9589 Location: Greensville,Ontario 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Jun 28, 2021 5:15 am     | 
				     | 
			 
			
				
  | 
			 
			
				no....
 
I replaced 74165s with PICs
 
Those modules are about $6, a PIC costing 50 cents can replace the 74165. | 
			 
		  | 
	
	
		  | 
	
	
		 |