CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Assembler 74HC165 Serial In,Parallel Out Shift Register

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Regular Guy



Joined: 04 Jun 2017
Posts: 110

View user's profile Send private message

Assembler 74HC165 Serial In,Parallel Out Shift Register
PostPosted: Sun Jun 27, 2021 7:20 pm     Reply with quote

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: 9239
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Jun 27, 2021 7:43 pm     Reply with quote

yes, used 1000s of them before PICs.....
Regular Guy



Joined: 04 Jun 2017
Posts: 110

View user's profile Send private message

PostPosted: Sun Jun 27, 2021 8:13 pm     Reply with quote

Thank you temtronic

Is this what you are talking about?

This first board uses 'TTL' input.

https://www.futurlec.com/Mini_TPIC6B595.shtml

This second board says SPI.

https://www.futurlec.com/Mini_TPIC6B595.shtml

Looks like it uses SPI section of MSSP module.

Is that what you mean by using PIC's?
_________________
PIC Hobbyist
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Mon Jun 28, 2021 12:03 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Jun 28, 2021 1:03 am     Reply with quote

Thank you Ttelmah

That is a 5 star answer! Smile

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: 9239
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jun 28, 2021 5:15 am     Reply with quote

no....
I replaced 74165s with PICs
Those modules are about $6, a PIC costing 50 cents can replace the 74165.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group