SPI Input port
2006-01-06 by charlesgrenz
Yahoo Groups archive
Index last updated: 2026-04-28 23:31 UTC
Thread
2006-01-06 by charlesgrenz
Hello group, Hope you all had a great holiday. I have a LPC2106 design that turns out to need more input lines then the 2106 has. Has any one have any luck with extending the I/O of the 2106 with the SPI bus? Thanks in advance, Charles
2006-01-06 by rtstofer
--- In lpc2000@yahoogroups.com, "charlesgrenz" <charles.grenz@s...> wrote: > > Hello group, > > Hope you all had a great holiday. > > I have a LPC2106 design that turns out to need more input lines then > the 2106 has. Has any one have any luck with extending the I/O of the > 2106 with the SPI bus? > > Thanks in advance, > > Charles > Yes, I used the Microchip MCP23S08. It worked just fine as 8 inputs. I didn't actually code the interrupt but I did wire it. Richard
2006-01-06 by charlesgrenz
Thanks Richard. I had forgotten I looked those over at one time. Have you worked with the 2138 spi? Do you "still" need to pull the SPI slave input high to make it work like the 2106? best regards, Charles --- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@p...> wrote:
> > --- In lpc2000@yahoogroups.com, "charlesgrenz" <charles.grenz@s...> > wrote: > > > > Hello group, > > > > Hope you all had a great holiday. > > > > I have a LPC2106 design that turns out to need more input lines > then > > the 2106 has. Has any one have any luck with extending the I/O of the > > 2106 with the SPI bus? > > > > Thanks in advance, > > > > Charles > > > > Yes, I used the Microchip MCP23S08. It worked just fine as 8 inputs. > I didn't actually code the interrupt but I did wire it. > > Richard >
2006-01-06 by Tom Walsh
charlesgrenz wrote: >Thanks Richard. > >I had forgotten I looked those over at one time. > >Have you worked with the 2138 spi? Do you "still" need to pull the SPI >slave input high to make it work like the 2106? > > > Sadly, yes, even though some Philips examples suggest this is not so. The only way I got Master mode working properly was to pullup SSEL1. TomW >best regards, >Charles > > >--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@p...> wrote: > > >>--- In lpc2000@yahoogroups.com, "charlesgrenz" <charles.grenz@s...> >>wrote: >> >> >>>Hello group, >>> >>> Hope you all had a great holiday. >>> >>> I have a LPC2106 design that turns out to need more input lines >>> >>> >>then >> >> >>>the 2106 has. Has any one have any luck with extending the I/O of the >>>2106 with the SPI bus? >>> >>> Thanks in advance, >>> >>>Charles >>> >>> >>> >>Yes, I used the Microchip MCP23S08. It worked just fine as 8 inputs. >>I didn't actually code the interrupt but I did wire it. >> >>Richard >> >> >> > > > > > > > >Yahoo! Groups Links > > > > > > > > -- Tom Walsh - WN3L - Embedded Systems Consultant http://openhardware.net, http://cyberiansoftware.com "Windows? No thanks, I have work to do..." ----------------------------------------------------
2006-01-06 by charlesgrenz
Thanks Tom. I was just hoping.... regards, Charles --- In lpc2000@yahoogroups.com, Tom Walsh <tom@o...> wrote: > > charlesgrenz wrote: > > >Thanks Richard. > > > >I had forgotten I looked those over at one time. > > > >Have you worked with the 2138 spi? Do you "still" need to pull the SPI > >slave input high to make it work like the 2106? > > > > > > > Sadly, yes, even though some Philips examples suggest this is not so. > The only way I got Master mode working properly was to pullup SSEL1. > > TomW > > > > >best regards, > >Charles > > > > > >--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@p...> wrote: > > > > > >>--- In lpc2000@yahoogroups.com, "charlesgrenz" <charles.grenz@s...> > >>wrote: > >> > >> > >>>Hello group, > >>> > >>> Hope you all had a great holiday. > >>> > >>> I have a LPC2106 design that turns out to need more input lines > >>> > >>> > >>then > >> > >> > >>>the 2106 has. Has any one have any luck with extending the I/O of the > >>>2106 with the SPI bus? > >>> > >>> Thanks in advance, > >>> > >>>Charles > >>> > >>> > >>> > >>Yes, I used the Microchip MCP23S08. It worked just fine as 8 inputs.
> >>I didn't actually code the interrupt but I did wire it. > >> > >>Richard > >> > >> > >> > > > > > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > -- > Tom Walsh - WN3L - Embedded Systems Consultant > http://openhardware.net, http://cyberiansoftware.com > "Windows? No thanks, I have work to do..." > ---------------------------------------------------- >
2006-01-07 by Rob Jansen
Charles, > I have a LPC2106 design that turns out to need more input lines then > the 2106 has. Has any one have any luck with extending the I/O of the > 2106 with the SPI bus? yes, a 74HC595 (serial in, parallel/serial out shift register) as an 8 bit output expander is used to control a 7-segment LED at the Embedded Artists prototype board: http://www.embeddedartists.com/products/boards/prototype.php, schematics can be found from that page. Knowing the 74Hc series a counterpart (parallel in - serial out) in the same range. Looks like the 74HC597 is a cheap SPI input variant. (http://www.standardics.philips.com/products/hc/pdf/74hc597.pdf) Rob
2006-01-07 by charlesgrenz
Hi Rob, thanks for the seuggestion and link. I looked at that at one time as a cheap expansion for the 2106 and even ordered some parts to play with but haven't had time to try it. Time is critical on this project, so I was going to go the safe route and use the Microchip version for now. regards, Charles --- In lpc2000@yahoogroups.com, "Rob Jansen" <rob@m...> wrote: > > Charles, > > > I have a LPC2106 design that turns out to need more input lines then > > the 2106 has. Has any one have any luck with extending the I/O of the > > 2106 with the SPI bus? > > yes, a 74HC595 (serial in, parallel/serial out shift register) as an 8 bit > output expander is used to control a 7-segment LED at the Embedded Artists
> prototype board: > http://www.embeddedartists.com/products/boards/prototype.php, schematics > can be found from that page. > > Knowing the 74Hc series a counterpart (parallel in - serial out) in the > same range. Looks like the 74HC597 is a cheap SPI input variant. > (http://www.standardics.philips.com/products/hc/pdf/74hc597.pdf) > > Rob >
2006-01-07 by rtstofer
--- In lpc2000@yahoogroups.com, "charlesgrenz" <charles.grenz@s...> wrote: > > Hi Rob, thanks for the seuggestion and link. I looked at that at one > time as a cheap expansion for the 2106 and even ordered some parts to > play with but haven't had time to try it. Time is critical on this > project, so I was going to go the safe route and use the Microchip > version for now. > > regards, > Charles Plus, you can configure the MCP23S08 pins as either input or output, get interrupt-on-change, set the polarity of the 'normal' state and a bunch of other things. It is a really nice chip. Richard
2006-01-07 by charlesgrenz
Hi Robert, I agree since this is a tight time frame project. I am winding up using the 16 bit version of the parts which will give me 32 bits of I/O and I can connect the interrupts to the processor to determine when an input port changes. This project has 30 inputs and at approx. 8MHz clock will give me just enought time to collect the port values and perform procedure in under 26us. Rob's suggestion on the other hand is a cheaper way of doing this, but I will not have the time to actually test the idea until the next project (which is after this one). Thanks to both of you for your help. regards, Charles --- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@p...> wrote:
> > --- In lpc2000@yahoogroups.com, "charlesgrenz" <charles.grenz@s...> > wrote: > > > > Hi Rob, thanks for the seuggestion and link. I looked at that at one > > time as a cheap expansion for the 2106 and even ordered some parts to > > play with but haven't had time to try it. Time is critical on this > > project, so I was going to go the safe route and use the Microchip > > version for now. > > > > regards, > > Charles > > Plus, you can configure the MCP23S08 pins as either input or output, > get interrupt-on-change, set the polarity of the 'normal' state and a > bunch of other things. It is a really nice chip. > > Richard >
2006-01-07 by George M. Gallant, Jr.
I want to add a lpc2214 to an existing robot that currently has 3
18f252's connected via
I2C. The LPC would become that MASTER and the PIC's become peripherals.
The PIC's
are at 5V due to external sensors and control circuits.
Questions: 1. What voltage shoudl the SDA & SCL be pulled up to?
2. Max clock rate for 10inch (25cm) cable?
Thanks,
George
[Non-text portions of this message have been removed]2006-01-08 by Rob Jansen
George,
The I/O pins are 5V tolerant and the I2C pins have open drain outputs.
So to answer Q1: You may pull the pins to 5 volt, creating a 5 volt
I2C interface for your PICs.
An answer on Q2 depends a bit on the type of cable used in combination
with bus termination.
I do not think however that a100 or 400 kHz clock will be a problem.
If you are woried about bus errors, check the amount of traffic that
passes over the bus and the response times you need and adapt your
clock to be the lowest allowable value. I.e: if writing an output to the
PIC needs 5 bytes (slave addr + 4 data) this uses 47 clocks (start bit +
4x9 + stop bit) and if this needs to complete within 10 ms which results
in a 4.7 kHz clock (3 of these on one bus result in 14.1 kHz).
Regards,
Rob
George M. Gallant, Jr. wrote:>I want to add a lpc2214 to an existing robot that currently has 3 >18f252's connected via >I2C. The LPC would become that MASTER and the PIC's become peripherals. >The PIC's >are at 5V due to external sensors and control circuits. > >Questions: 1. What voltage shoudl the SDA & SCL be pulled up to? > 2. Max clock rate for 10inch (25cm) cable? > >
2006-01-08 by George M. Gallant, Jr.
Rob, Thanks. George On Sun, 2006-01-08 at 10:01 +0100, Rob Jansen wrote: > George, > > The I/O pins are 5V tolerant and the I2C pins have open drain outputs. > So to answer Q1: You may pull the pins to 5 volt, creating a 5 volt > I2C interface for your PICs. > > An answer on Q2 depends a bit on the type of cable used in > combination > with bus termination. > I do not think however that a100 or 400 kHz clock will be a problem. > If you are woried about bus errors, check the amount of traffic that > passes over the bus and the response times you need and adapt your > clock to be the lowest allowable value. I.e: if writing an output to > the > PIC needs 5 bytes (slave addr + 4 data) this uses 47 clocks (start bit > + > 4x9 + stop bit) and if this needs to complete within 10 ms which > results > in a 4.7 kHz clock (3 of these on one bus result in 14.1 kHz). > > Regards, > > Rob > > > George M. Gallant, Jr. wrote: > > >I want to add a lpc2214 to an existing robot that currently has 3 > >18f252's connected via > >I2C. The LPC would become that MASTER and the PIC's become > peripherals. > >The PIC's > >are at 5V due to external sensors and control circuits. > > > >Questions: 1. What voltage shoudl the SDA & SCL be pulled up to? > > 2. Max clock rate for 10inch (25cm) cable? > > > > > > > > > SPONSORED LINKS > > Microprocessor > Microcontrollers > Pic microcontrollers > 8051 microprocessor > > > > ______________________________________________________________________ > YAHOO! GROUPS LINKS > > > 1. Visit your group "lpc2000" on the web. > > 2. To unsubscribe from this group, send an email to: > lpc2000-unsubscribe@yahoogroups.com > > 3. Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service. > > > > ______________________________________________________________________ > > [Non-text portions of this message have been removed]