View previous topic :: View next topic |
Author |
Message |
mc_joel_2
Joined: 15 Feb 2012 Posts: 1
|
pic18f97j60 with shift registers and SPI |
Posted: Wed Feb 15, 2012 2:45 am |
|
|
Hello,
I have a Picdem.net 2 dev board with a pic18f97j60. I want to expand the outputs with some HEF4094 shift registers.
I can't use SPI1 because this is connected to the ethernet controller.
But I don't know how I can configure the next SPI ports.
Can somebody help me?
thnx |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Wed Feb 15, 2012 6:48 am |
|
|
I don't use that PIC but have found that reading the datasheet and the header files is very,very important.
Since you say SPI1 is used, perhaps in the device.h file it lists the names of the next hardware SPI set of pins?
If this device doesn't have a 2nd hardwarer SPI port, it's very,very easy to create a sofware SPI with the compiler. |
|
|
dpechman
Joined: 04 Dec 2007 Posts: 43
|
|
Posted: Wed Feb 15, 2012 7:48 am |
|
|
You can use software-spi. I have 2 cd4094 working with 18f67j60 using ordinary pins.
Just data, clock and chip_enable needed for 4094. |
|
|
|