user1077980
user1077980

Reputation: 155

from PIC18f4550 to serial in parallel out latch

I searched alot about how to send data from PIC18f4550 to 8-bit serial-in, serial or parallel 74HC595 latch.

I need a code example to understand how the operation can be performed.

Any help is appreciated.

Upvotes: 2

Views: 469

Answers (1)

Bryan C.
Bryan C.

Reputation: 347

A lot of shift registers and latches are meant to be used with the MCUs SPI interface pins, but when you look at the datasheets this is not clear because the latch IC pins will have a different naming convention. I would try and find an application note or document (not the datasheet) for the part that you want to interface with and that should explain the interface method. The harder way would be to study a latch datasheet to see how SPI could be used to do the writes.

I believe Microchip has SPI examples for their PIC18 micros on there website if you need code to work with.

EDIT: If a SPI interface is not available then you will basically have to "bit bang" SPI through other IO pins. There are many, many examples of this if you Google "bit bang SPI".

Upvotes: 0

Related Questions